Files
odoo-usability/purchase_usability_extension/supplierinfo.py

16 lines
509 B
Python
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# coding: utf-8
# © 2015 David BEAL @ Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models, fields
class ProductSupplierinfo(models.Model):
_inherit = 'product.supplierinfo'
# Change product_tmpl_id to required=False
# because I added that field to form view and it blocks when you save
# the product form with a new supplier info
# This field is now required in the form view
product_tmpl_id = fields.Many2one(required=False)