From ba1058a2b684558a0b0ec1dcd41cff16176164a7 Mon Sep 17 00:00:00 2001 From: Ayush Tiwari <ayush.tiwari@nexedi.com> Date: Tue, 27 Jun 2017 15:13:09 +0000 Subject: [PATCH] bt5_config: Better to generate newId than to use the old ones --- product/ERP5/Document/BusinessManager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/product/ERP5/Document/BusinessManager.py b/product/ERP5/Document/BusinessManager.py index 1e804a7a26..8225e2e237 100644 --- a/product/ERP5/Document/BusinessManager.py +++ b/product/ERP5/Document/BusinessManager.py @@ -711,7 +711,8 @@ class BusinessItem(XMLObject): _recursiveRemoveUid(obj) obj = aq_base(obj) obj.isIndexable = ConstantGetter('isIndexable', value=False) - self._setObject(obj.getId(), obj, suppress_events=True) + new_id = self.generateNewId() + self._setObject(new_id, obj, suppress_events=True) except AttributeError: # In case the object doesn't exist, just pass without raising error pass -- 2.30.9