Commit ed26adc7 authored by Christophe Dumez's avatar Christophe Dumez

- Added an uninstall function for Workflow Chains


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9232 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 97f1762f
......@@ -1328,6 +1328,17 @@ class PortalTypeWorkflowChainTemplateItem(BaseTemplateItem):
chain_dict['chain_%s' % portal_type] = self._objects[path]
context.portal_workflow.manage_changeWorkflows(default_chain,
props=chain_dict)
def uninstall(self, context, **kw):
(default_chain, chain_dict) = getChainByType(context)
for path in self._objects.keys():
path_splitted = path.split('/', 1)
if len(path_splitted) < 2:
continue
portal_type = path_splitted[1]
id = 'chain_%s' % portal_type
if id in chain_dict.keys():
del chain_dict[id]
context.portal_workflow.manage_changeWorkflows('', props=chain_dict)
def _importFile(self, file_name, file):
# import workflow chain for portal_type
......
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