From 0ed22b30c8f03a6c91fae7f5a768700f5e3caee8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 6 Apr 2013 13:01:11 +0200 Subject: [PATCH] Don't copy boms when copying product as the domain will be wrong review748002 (transplanted from 818722680862) --- product.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/product.py b/product.py index c3d81ff7e8..2c08a3a6cf 100644 --- a/product.py +++ b/product.py @@ -40,6 +40,13 @@ class Product(ModelSQL, ModelView): return False return True + def copy(self, ids, default=None): + if default is None: + default = {} + default = default.copy() + default.setdefault('boms', None) + return super(Product, self).copy(ids, default=default) + Product()