Commit c7650f56 authored by wenjie.zheng's avatar wenjie.zheng Committed by Sebastien Robin

WorkflowTool.py: add bootstrap codes.

parent 732bf815
...@@ -399,6 +399,19 @@ def generateActionList(worklist_metadata, worklist_result, portal_url): ...@@ -399,6 +399,19 @@ def generateActionList(worklist_metadata, worklist_result, portal_url):
'category': metadata['action_box_category']}) 'category': metadata['action_box_category']})
return action_list return action_list
def WorkflowTool_isBootstrapRequired(self):
# migrate after ERP5Tool installed (portal_rules is the first item of setupLastTools
# in ERP5Site.py);
if self.getPortalObject()._getOb('portal_rules', None) is not None:
return True
return False
def WorkflowTool_bootstrap(self):
self.getPortalObject().migrateToPortalWorkflowClass()
WorkflowTool._isBootstrapRequired = WorkflowTool_isBootstrapRequired
WorkflowTool._bootstrap = WorkflowTool_bootstrap
def WorkflowTool_listActions(self, info=None, object=None, src__=False): def WorkflowTool_listActions(self, info=None, object=None, src__=False):
""" """
Returns a list of actions to be displayed to the user. Returns a list of actions to be displayed to the user.
......
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