Commit 8000da60 authored by Jérome Perrin's avatar Jérome Perrin

ERP5Site_getCurrentDialogAction compares the action against the "normalized"...

ERP5Site_getCurrentDialogAction compares the action against the "normalized" url (ie. with shortest acquisition path), so actions that uses a more complex acquisition context are not matched. In that case, return the first action for which the dialog id matches with the one from the url

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43342 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 93526eb0
...@@ -60,6 +60,11 @@ else:\n ...@@ -60,6 +60,11 @@ else:\n
for action in dialog_actions:\n for action in dialog_actions:\n
if current_url == action[\'url\'].split(\'?\')[0]:\n if current_url == action[\'url\'].split(\'?\')[0]:\n
return action\n return action\n
# still not found, return the first action with form_id matching\n
form_id = current_url.split(\'/\')[-1]\n
for action in dialog_actions:\n
if form_id == action[\'url\'].split(\'?\')[0].split(\'/\')[-1]:\n
return action\n
return None\n return None\n
</string> </value> </string> </value>
</item> </item>
......
1060 1061
\ 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