Commit 5f3f2257 authored by Yusei Tahara's avatar Yusei Tahara Committed by Arnaud Fontaine

Redirect to view form with a nice message if selected workflow action is not available.

To show a workflow dialog which absolutely fail is not good.
parent 32934bfd
...@@ -63,6 +63,12 @@ if workflow_action:\n ...@@ -63,6 +63,12 @@ if workflow_action:\n
if action[\'id\'] == workflow_action:\n if action[\'id\'] == workflow_action:\n
return action[\'name\']\n return action[\'name\']\n
\n \n
if workflow_action:\n
# It means that workflow_action is not available now. Redirect to default view with a nice message.\n
from Products.ERP5Type.Message import translateString\n
message = translateString("Workflow state may have been updated by other user. Please try again.")\n
context.Base_redirect(\'view\', keep_items={\'portal_status_message\': message})\n
\n
return form.title\n return form.title\n
</string> </value> </string> </value>
</item> </item>
......
2012-10-19 yusei
* Redirect to view form with a nice message if selected workflow action is not available. To show a workflow dialog which absolutely fail is not good.
2012-10-11 arnaud.fontaine 2012-10-11 arnaud.fontaine
* Fix dead ProxyField after renaming of ProxyFields (now available in erp5_core_proxy_field_legacy). * Fix dead ProxyField after renaming of ProxyFields (now available in erp5_core_proxy_field_legacy).
......
41081 41082
\ 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