SST-10: remove field 'default_code' on update-product as it may conflict with inventory_lines
parent
4834159b28
commit
dcb7e5dbdb
|
|
@ -80,6 +80,8 @@ class ProductTemplate(models.Model):
|
|||
vals = self.correct_values(vals)
|
||||
product_template = self.with_context(active_test=False).search([('default_code', '=', vals['default_code'])])
|
||||
if product_template:
|
||||
# default_code may not be changed if there is already an inventory_line (in other company), so we remove it from the dict
|
||||
vals.pop('default_code',None)
|
||||
product_template.write(vals)
|
||||
else:
|
||||
if vals['active']:
|
||||
|
|
|
|||
Loading…
Reference in New Issue