Commit e0da33f8 authored by wenjie.zheng's avatar wenjie.zheng

patches/WorkflowTool.py: remove useless comments.

parent 8b058bc2
...@@ -462,13 +462,11 @@ def WorkflowTool_listActions(self, info=None, object=None, src__=False): ...@@ -462,13 +462,11 @@ def WorkflowTool_listActions(self, info=None, object=None, src__=False):
document = info.object document = info.object
### zwj: following part is for ERP5Workflow actions
if document is not None: if document is not None:
document_pt = document.getTypeInfo() document_pt = document.getTypeInfo()
if document_pt is not None: if document_pt is not None:
workflow_list = document_pt.getTypeERP5WorkflowList() workflow_list = document_pt.getTypeERP5WorkflowList()
if (workflow_list is not None) and (workflow_list is not []): if (workflow_list is not None) and (workflow_list is not []):
LOG('zwj: ERP5Workflow_list is %s'%str(workflow_list), WARNING, ' in Workflow tool.')
for wf_id in workflow_list: for wf_id in workflow_list:
did[wf_id] = None did[wf_id] = None
wf = self.getPortalObject().getDefaultModule('Workflow')._getOb(wf_id, None) wf = self.getPortalObject().getDefaultModule('Workflow')._getOb(wf_id, None)
...@@ -477,12 +475,10 @@ def WorkflowTool_listActions(self, info=None, object=None, src__=False): ...@@ -477,12 +475,10 @@ def WorkflowTool_listActions(self, info=None, object=None, src__=False):
a = wf.listObjectActions(info) a = wf.listObjectActions(info)
if a is not None: if a is not None:
actions.extend(a) actions.extend(a)
a = wf.getWorklistVariableMatchDict(info) ### zwj: replace listGlobalActions(info) a = wf.getWorklistVariableMatchDict(info)
if a is not None: if a is not None:
worklist_dict[wf_id] = a worklist_dict[wf_id] = a
### ==========================================================================
### zwj: following part is for DCWorkflow actions
for wf_id in chain: for wf_id in chain:
did[wf_id] = None did[wf_id] = None
wf = self.getWorkflowById(wf_id) wf = self.getWorkflowById(wf_id)
...@@ -494,7 +490,6 @@ def WorkflowTool_listActions(self, info=None, object=None, src__=False): ...@@ -494,7 +490,6 @@ def WorkflowTool_listActions(self, info=None, object=None, src__=False):
if a is not None: if a is not None:
worklist_dict[wf_id] = a worklist_dict[wf_id] = a
wf_ids = self.getWorkflowIds() wf_ids = self.getWorkflowIds()
for wf_id in wf_ids: for wf_id in wf_ids:
if not did.has_key(wf_id): if not did.has_key(wf_id):
...@@ -503,7 +498,6 @@ def WorkflowTool_listActions(self, info=None, object=None, src__=False): ...@@ -503,7 +498,6 @@ def WorkflowTool_listActions(self, info=None, object=None, src__=False):
a = wf.getWorklistVariableMatchDict(info) a = wf.getWorklistVariableMatchDict(info)
if a is not None: if a is not None:
worklist_dict[wf_id] = a worklist_dict[wf_id] = a
### ==========================================================================
if worklist_dict: if worklist_dict:
portal = self.getPortalObject() portal = self.getPortalObject()
...@@ -617,6 +611,7 @@ def WorkflowTool_listActions(self, info=None, object=None, src__=False): ...@@ -617,6 +611,7 @@ def WorkflowTool_listActions(self, info=None, object=None, src__=False):
key=lambda x: '/'.join((x['workflow_id'], x['worklist_id'])), key=lambda x: '/'.join((x['workflow_id'], x['worklist_id'])),
) )
return action_list return action_list
user = str(_getAuthenticatedUser(self)) user = str(_getAuthenticatedUser(self))
if src__: if src__:
actions = _getWorklistActionList() actions = _getWorklistActionList()
......
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