From 43a65e160f1763a5b82042dcc299bfea59f18c67 Mon Sep 17 00:00:00 2001
From: Yoshinori Okuji <yo@nexedi.com>
Date: Fri, 22 Apr 2005 23:40:58 +0000
Subject: [PATCH] Allocate a new uid rather than set to zero.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2944 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/CopySupport.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/product/ERP5Type/CopySupport.py b/product/ERP5Type/CopySupport.py
index 58e7e58ede..95cb5aab89 100755
--- a/product/ERP5Type/CopySupport.py
+++ b/product/ERP5Type/CopySupport.py
@@ -171,7 +171,8 @@ class CopyContainer:
     #LOG("After Clone ",0, "id:%s containes:%s" % (str(item.id), str(container.id)))
     # Change uid attribute so that Catalog thinks object was not yet catalogued
     self_base = aq_base(self)
-    self_base.uid = None
+    portal_catalog = getToolByName(self, 'portal_catalog')
+    self_base.uid = portal_catalog.newUid()
 
     # Clear the transaction references
     if getattr(self_base, 'default_source_reference', None):
-- 
2.30.9