[Erp5-report] r19166 - /erp5/trunk/products/ERP5Type/CopySupport.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Feb 8 11:59:33 CET 2008


Author: vincent
Date: Fri Feb  8 11:59:32 2008
New Revision: 19166

URL: http://svn.erp5.org?rev=19166&view=rev
Log:
Postpone call to _getTypeBasedMethod('afterClone') after applying workflow's security: security was copied along with the object, but workflow state was reset, so rights on the documents are inconsistent with the ones set on the workflow state untill security is re-applied.

Modified:
    erp5/trunk/products/ERP5Type/CopySupport.py

Modified: erp5/trunk/products/ERP5Type/CopySupport.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/CopySupport.py?rev=19166&r1=19165&r2=19166&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/CopySupport.py (original)
+++ erp5/trunk/products/ERP5Type/CopySupport.py Fri Feb  8 11:59:32 2008
@@ -265,11 +265,6 @@
     if getattr(self_base, 'default_destination_reference', None):
       delattr(self_base, 'default_destination_reference')
     
-    # Call a type based method to reset so properties if necessary
-    script = self._getTypeBasedMethod('afterClone')
-    if script is not None and callable(script):
-      script()
-
     # Clear the workflow history
     # XXX This need to be tested again
     if getattr(self_base, 'workflow_history', _marker) is not _marker:
@@ -304,6 +299,11 @@
     if self.getParentValue().getPortalType() == 'Preference':
       # Make this a template if our parent is a preference
       self.makeTemplate()
+
+    # Call a type based method to reset so properties if necessary
+    script = self._getTypeBasedMethod('afterClone')
+    if script is not None and callable(script):
+      script()
 
     self.__recurse('manage_afterClone', item)
 




More information about the Erp5-report mailing list