Commit 01f28e57 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_officejs_support_request_ui: change to use new workflow API

parent 26c50c6d
......@@ -9,7 +9,7 @@ info = {}
workflow = portal.portal_workflow.ticket_workflow
for state in workflow['states'].objectValues():
for state in workflow.getStateValueList():
state_title = state.title_or_id()
if 0:
# We don't translate yet, it needs several other fixes
......
......@@ -24,7 +24,7 @@ for worklist in workflow.worklists.objectValues():
'query_list': [
{'key': 'local_roles',
'type': 'simple',
'value': role, } for role in worklist.getGuard().getRolesText().split("; ")]
'value': role, } for role in worklist.getGuardRoleList()]
}]
for key in worklist.getVarMatchKeys():
......@@ -34,7 +34,7 @@ for worklist in workflow.worklists.objectValues():
# {'translated_validation_state_title': 'Brouillon'}
# so that it looks good in the module view.
key = 'translated_%s_title' % key
state_title = workflow['states'].restrictedTraverse(value).title_or_id()
state_title = workflow.getStateValueByReference(value[0]).title_or_id()
value = unicode(translateString(
'%s [state in %s]' % (state_title, workflow.getId()),
default=unicode(translateString(state_title))))
......
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