Commit 9c909ece authored by wenjie.zheng's avatar wenjie.zheng

Base.py: Add ERP5Workflow compatibility to getWorkflowStateItemList().

parent cc3aabcd
......@@ -2925,6 +2925,7 @@ class Base( CopyContainer,
related_count += 1
return related_count
# Workflow Related Method
security.declarePublic('getWorkflowStateItemList')
def getWorkflowStateItemList(self):
......@@ -2934,6 +2935,10 @@ class Base( CopyContainer,
result = []
for wf in self.portal_workflow.getWorkflowsFor(self):
result += [(wf.id, wf._getWorkflowStateOf(self, id_only=1))]
for workflow_id in self.getTypeInfo().getTypeERP5WorkflowList():
workflow = self.getPortalObject().getDefaultModule('Workflow')._getOb(workflow_id)
sdef = self._getDefaultAcquiredValue(workflow.getStateBaseCategory())
result += [(workflow_id, sdef.getId())]
return result
security.declarePublic('getWorkflowInfo')
......
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