Supplierinfo: remove field that is not usefull for everybody ; fix addition of supplier on products

This commit is contained in:
Alexis de Lattre
2017-02-09 22:23:36 +01:00
parent 4b26ab78be
commit 869c7176f7
2 changed files with 6 additions and 4 deletions

View File

@@ -8,5 +8,8 @@ from openerp import models, fields
class ProductSupplierinfo(models.Model):
_inherit = 'product.supplierinfo'
supplier_is_company = fields.Boolean(
comodel_name='res.partner', related='name.is_company')
# 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)