Commit 92f7a247 authored by Fabien Morin's avatar Fabien Morin

* use state instead of worklist_id in getPortalTypeWorklistDictForWorkflow extenal method

* update comment

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23363 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 74e782dd
...@@ -44,16 +44,18 @@ def getPortalTypeWorklistDictForWorkflow(self, workflow_list): ...@@ -44,16 +44,18 @@ def getPortalTypeWorklistDictForWorkflow(self, workflow_list):
return a dict containing portal_type and all informations about work_list return a dict containing portal_type and all informations about work_list
of workflow : of workflow :
{ 'Declaration TVA': { 'id':'applications_to_submit', {'Subscription Form': {('signed',): {'category': 'global',
'description':'Applications to submit', 'count': 1,
'validation_state':'draft', 'description': 'Subscription Forms to archive',
'formated_name':'Applications to submit (%(count)s)' 'formated_name': 'Subscription Forms to archive (%(count)s)',
'formated_url':'Base_viewSearchResultList?validation_state=submitted&local_roles=%(local_roles)s&reset=1&portal_type=%(portal_type)s', 'formated_url': 'Base_viewSearchResultList?validation_state=signed&local_roles=Assignor&reset=1&portal_type=Subscription Form
'category':'global', ',
'count':2, 'id': 'subscription_forms_to_archive',
'roles':['Owner'], 'roles': ('Assignor',),
'validation_state': ('signed',)}
}, },
..... .....
} }
""" """
portal_type_worklist_dict = {} portal_type_worklist_dict = {}
...@@ -89,8 +91,8 @@ def getPortalTypeWorklistDictForWorkflow(self, workflow_list): ...@@ -89,8 +91,8 @@ def getPortalTypeWorklistDictForWorkflow(self, workflow_list):
if not portal_type_worklist_dict.has_key(portal_type): if not portal_type_worklist_dict.has_key(portal_type):
portal_type_worklist_dict[portal_type] = {} portal_type_worklist_dict[portal_type] = {}
portal_type_worklist_dict[portal_type][worklist_id] = {} portal_type_worklist_dict[portal_type][state] = {}
result_dict = portal_type_worklist_dict[portal_type][worklist_id] result_dict = portal_type_worklist_dict[portal_type][state]
result_dict['id']=worklist_id result_dict['id']=worklist_id
result_dict['count']=len(result) result_dict['count']=len(result)
result_dict['description']=worklist.description result_dict['description']=worklist.description
......
241 244
\ No newline at end of file \ No newline at end of file
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