From df4192893c6d18ec7ea94f5de4b1a5a323602b79 Mon Sep 17 00:00:00 2001
From: Yusei Tahara <yusei@nexedi.com>
Date: Fri, 29 Feb 2008 14:41:51 +0000
Subject: [PATCH] stop to call makeTemplate here. At this point, uid of sub
 object is still old and if calling makeTemplate, original document will be
 unindexed.

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

diff --git a/product/ERP5Type/CopySupport.py b/product/ERP5Type/CopySupport.py
index affd4272d9..ce464e98ec 100644
--- a/product/ERP5Type/CopySupport.py
+++ b/product/ERP5Type/CopySupport.py
@@ -296,9 +296,9 @@ class CopyContainer:
         except WorkflowException:
           pass
 
-    if self.getParentValue().getPortalType() == 'Preference':
-      # Make this a template if our parent is a preference
-      self.makeTemplate()
+    ### Don't call makeTemplate here!!
+    ### At this point, uid of sub object is still old and
+    ### if calling makeTemplate, original document will be unindexed.
 
     # Call a type based method to reset so properties if necessary
     script = self._getTypeBasedMethod('afterClone')
-- 
2.30.9