Commit 8a573fdf authored by Vincent Pelletier's avatar Vincent Pelletier

Postpone call to _getTypeBasedMethod('afterClone') after applying workflow's...

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.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19166 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5fc26539
......@@ -265,11 +265,6 @@ class CopyContainer:
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:
......@@ -305,6 +300,11 @@ class CopyContainer:
# 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)
def manage_afterAdd(self, item, container):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment