Commit 54867ca7 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

in case of 'keep-workflow' object, we need to recalculate workflow related...

in case of 'keep-workflow' object, we need to recalculate workflow related permissions, because manage_afterClone may reset them.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45283 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e622b917
......@@ -1070,6 +1070,8 @@ class ObjectTemplateItem(BaseTemplateItem):
obj.manage_afterClone(obj)
if workflow_history is not None:
setattr(obj, 'workflow_history', workflow_history)
for workflow_id in workflow_history.keys():
obj.updateRoleMappingsFor(workflow_id)
del obj.isIndexable
if getattr(aq_base(obj), 'reindexObject', None) is not None:
obj.reindexObject()
......
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