change behaviour of SST-10: do not update manufacturing_number if not empty

develop
Andreas Osim 2021-07-22 16:27:32 +02:00
parent c50fb566a2
commit 9e5480d004
1 changed files with 2 additions and 0 deletions

View File

@ -96,6 +96,8 @@ class ProductTemplate(models.Model):
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)
if product_template['manufacturing_number']:
vals.pop('manufacturing_number',None)
product_template.write(vals)
else:
if vals['active']: