Commit cb9b33f5 authored by Jérome Perrin's avatar Jérome Perrin

When generating portal_type= parameter for worklists, don't generate a string

that the catalog should parse later, but pass it multiple time
(portal_type=A&portal_type=B ..), zope publisher will convert this format to a
list.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25480 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 56d01483
...@@ -179,11 +179,11 @@ def DCWorkflowDefinition_listGlobalActions(self, info): ...@@ -179,11 +179,11 @@ def DCWorkflowDefinition_listGlobalActions(self, info):
# Patch for ERP5 by JP Smets in order to # Patch for ERP5 by JP Smets in order to
# filter per portal type more easily (ie. without # filter per portal type more easily (ie. without
# hardcoding it all) # hardcoding it all)
fmt_data._push({'portal_type': ' OR '.join(dict['portal_type'])}) fmt_data._push({'portal_type': '&portal_type='.join(dict['portal_type'])})
# Patch for ERP5 by JP Smets in order # Patch for ERP5 by JP Smets in order
# to implement worklists and search of local roles # to implement worklists and search of local roles
if dict.has_key('local_roles'): if dict.has_key('local_roles'):
fmt_data._push({'local_roles': join(dict['local_roles'],'%3B')}) fmt_data._push({'local_roles': '&local_roles='.join(dict['local_roles'])})
else: else:
fmt_data._push({'local_roles': ''}) fmt_data._push({'local_roles': ''})
res.append((id, {'name': qdef.actbox_name % fmt_data, res.append((id, {'name': qdef.actbox_name % fmt_data,
...@@ -251,8 +251,8 @@ def DCWorkflowDefinition_getWorklistVariableMatchDict(self, info): ...@@ -251,8 +251,8 @@ def DCWorkflowDefinition_getWorklistVariableMatchDict(self, info):
if is_permitted_worklist: if is_permitted_worklist:
format_data = TemplateDict() format_data = TemplateDict()
format_data._push(info) format_data._push(info)
format_data._push({'portal_type': ' OR '.join(variable_match['portal_type']), format_data._push({'portal_type': '&portal_type='.join(variable_match['portal_type']),
'local_roles': '%3B'.join(variable_match.get(SECURITY_PARAMETER_ID, []))}) 'local_roles': '&local_roles='.join(variable_match.get(SECURITY_PARAMETER_ID, []))})
variable_match[WORKLIST_METADATA_KEY] = {'format_data': format_data, variable_match[WORKLIST_METADATA_KEY] = {'format_data': format_data,
'worklist_title': action_box_name, 'worklist_title': action_box_name,
'worklist_id': worklist_id, 'worklist_id': worklist_id,
......
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