diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getFormViewDialogActionButtonTitle.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getFormViewDialogActionButtonTitle.xml index 71a4847184ba79b9cfa8cbd961ed110735058c0a..cd99f750124018bbc9be965295a96c9eef6489e4 100644 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getFormViewDialogActionButtonTitle.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getFormViewDialogActionButtonTitle.xml @@ -63,6 +63,12 @@ if workflow_action:\n if action[\'id\'] == workflow_action:\n return action[\'name\']\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 </string> </value> </item> diff --git a/product/ERP5/bootstrap/erp5_core/bt/change_log b/product/ERP5/bootstrap/erp5_core/bt/change_log index b1cc8f3201d9f247baeee743dbd1444eb10f8741..1c39978929d5e4e59135bdaf8defb1cc4e13f19e 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/change_log +++ b/product/ERP5/bootstrap/erp5_core/bt/change_log @@ -1,3 +1,6 @@ +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 * Fix dead ProxyField after renaming of ProxyFields (now available in erp5_core_proxy_field_legacy). diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision index 8956e57e800b1a59337384d34f9922779ef43017..e73303378331befd8ecafeeea30c963c204fc8ec 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/revision +++ b/product/ERP5/bootstrap/erp5_core/bt/revision @@ -1 +1 @@ -41079 \ No newline at end of file +41080 \ No newline at end of file