From 25bf57c9e7de1f34de766bd2e2f96f314aa1f24f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 29 Mar 2013 00:01:53 +0100 Subject: [PATCH] Don't copy boms when copying product as the domain will be wrong review748002 (transplanted from 818722680862dd9d095384b190b3aea2ef8b6716) --- product.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/product.py b/product.py index f9e524d04c..fcd6ce8bad 100644 --- a/product.py +++ b/product.py @@ -42,6 +42,14 @@ class Product: return False return True + @classmethod + def copy(cls, products, default=None): + if default is None: + default = {} + default = default.copy() + default.setdefault('boms', None) + return super(Product, cls).copy(products, default=default) + class ProductBom(ModelSQL, ModelView): 'Product - BOM'