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

Folder_getWorkflowActionDocumentList.py: compatibility modification.

parent 8a9a9a44
...@@ -89,7 +89,7 @@ def getDocumentGroupByWorkflowStateList(self, form_id='', **kw): ...@@ -89,7 +89,7 @@ def getDocumentGroupByWorkflowStateList(self, form_id='', **kw):
for workflow in wf_tool.getWorkflowsFor(doc): for workflow in wf_tool.getWorkflowsFor(doc):
if workflow.getId() in skipped_workflow_id_list: if workflow.getId() in skipped_workflow_id_list:
continue continue
state_var = workflow.variables.getStateVar() state_var = workflow.getStateVariable()
translated_workflow_state_title = doc.getProperty( translated_workflow_state_title = doc.getProperty(
'translated_%s_title' % state_var) 'translated_%s_title' % state_var)
if state_var == workflow_state: if state_var == workflow_state:
...@@ -121,7 +121,7 @@ def getDocumentGroupByWorkflowStateList(self, form_id='', **kw): ...@@ -121,7 +121,7 @@ def getDocumentGroupByWorkflowStateList(self, form_id='', **kw):
for workflow in wf_tool.getWorkflowsFor(document): for workflow in wf_tool.getWorkflowsFor(document):
if workflow.getId() in skipped_workflow_id_list: if workflow.getId() in skipped_workflow_id_list:
continue continue
if state_var == workflow.variables.getStateVar(): if state_var == workflow.getStateVariable():
key = (document.getPortalTypeName(), workflow.getId(), key = (document.getPortalTypeName(), workflow.getId(),
document.getProperty(state_var)) document.getProperty(state_var))
document_count = workflow_state_dict.get(key, (None, 0))[1] document_count = workflow_state_dict.get(key, (None, 0))[1]
...@@ -131,7 +131,7 @@ def getDocumentGroupByWorkflowStateList(self, form_id='', **kw): ...@@ -131,7 +131,7 @@ def getDocumentGroupByWorkflowStateList(self, form_id='', **kw):
for (ptype, workflow_id, state), (doc, document_count) in\ for (ptype, workflow_id, state), (doc, document_count) in\
workflow_state_dict.iteritems(): workflow_state_dict.iteritems():
workflow = wf_tool.getWorkflowById(workflow_id) workflow = wf_tool.getWorkflowById(workflow_id)
state_var = workflow.variables.getStateVar() state_var = workflow.getStateVariable()
translated_workflow_state_title = doc.getProperty( translated_workflow_state_title = doc.getProperty(
'translated_%s_title' % state_var) 'translated_%s_title' % state_var)
workflow_id = workflow.getId() workflow_id = workflow.getId()
......
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