From 9e5480d0048a6e01e581737199f1463f7f584b2a Mon Sep 17 00:00:00 2001 From: Andreas Osim Date: Thu, 22 Jul 2021 16:27:32 +0200 Subject: [PATCH] change behaviour of SST-10: do not update manufacturing_number if not empty --- ext/custom-addons/dp_custom/models/product.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/custom-addons/dp_custom/models/product.py b/ext/custom-addons/dp_custom/models/product.py index d6e77aaa..22fa7efb 100644 --- a/ext/custom-addons/dp_custom/models/product.py +++ b/ext/custom-addons/dp_custom/models/product.py @@ -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']: