Commit 346a7f88 authored by wenjie.zheng's avatar wenjie.zheng Committed by Sebastien Robin

erp5_core: in action button script, get action refference instead of id.

parent e442dde0
......@@ -58,9 +58,12 @@ if button_title is not None:\n
\n
wf_actions = context.portal_actions.portal_actions.listFilteredActionsFor(context)[\'workflow\']\n
workflow_action = request.get(\'workflow_action\', None) or request.get(\'field_my_workflow_action\', None)\n
\n
if workflow_action:\n
for action in wf_actions: \n
if action[\'id\'] == workflow_action:\n
for action in wf_actions:\n
# extract action reference from the url predefined\n
action_reference = action[\'url\'][action[\'url\'].find(\'workflow_action\')+16:]\n
if action_reference == workflow_action:\n
return action[\'name\']\n
\n
if workflow_action:\n
......
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