From 092a1ccd638d0703d86bd2e38f1718695d754d65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com> Date: Mon, 13 Mar 2006 20:15:10 +0000 Subject: [PATCH] take message class into account for display of workflow history git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6088 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../Base_getWorkflowHistoryItemList.xml | 9 +++++++++ .../erp5_core/Workflow_statusModify.xml | 5 ++++- product/ERP5/bootstrap/erp5_core/bt/change_log | 16 +++++++++++++++- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getWorkflowHistoryItemList.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getWorkflowHistoryItemList.xml index 899f4eb36a..106a399886 100755 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getWorkflowHistoryItemList.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getWorkflowHistoryItemList.xml @@ -102,6 +102,15 @@ for workflow_item in workflow_item_list:\n if value == "\'edit\'":\n value = "edit"\n value = wf_transitions[value].title or wf_transitions[value].actbox_name or value\n + if key == \'error_message\' and not same_type(value, \'\'):\n + # use of Message class\n + value = \'%s\' %value \n + elif key == \'error_message\' and same_type(value, \'\'):\n + # old message way\n + value = context.Localizer.erp5_ui.gettext(value)\n + if same_type(value, \'\') and key != \'error_message\':\n + value = context.Localizer.erp5_ui.gettext(value)\n +\n if same_type(value, \'\'):\n value = context.Localizer.erp5_ui.gettext(value)\n o.setProperty(key, value)\n diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Workflow_statusModify.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Workflow_statusModify.xml index 9dcba9b911..81d57c5a47 100755 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Workflow_statusModify.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Workflow_statusModify.xml @@ -113,7 +113,9 @@ except FormValidationError, validation_errors:\n return form(request)\n \n except ValidationFailed, error_message:\n - # I hope the error_message is already translated (if we need to use mapping)\n + if hasattr(error_message, \'msg\'):\n + # use of Message class to store message+mapping+domain\n + error_message = error_message.msg\n redirect_url = \'%s/%s?%s\' % ( context.absolute_url(), form_id\n , \'portal_status_message=%s\' % error_message\n )\n @@ -193,6 +195,7 @@ context.REQUEST[ \'RESPONSE\' ].redirect( redirect_url )\n <string>validation_errors</string> <string>field_errors</string> <string>error_message</string> + <string>hasattr</string> </tuple> </value> </item> diff --git a/product/ERP5/bootstrap/erp5_core/bt/change_log b/product/ERP5/bootstrap/erp5_core/bt/change_log index 1aec2939d1..311e71d3b3 100755 --- a/product/ERP5/bootstrap/erp5_core/bt/change_log +++ b/product/ERP5/bootstrap/erp5_core/bt/change_log @@ -1,4 +1,18 @@ -2006-02-07 Kevin +2006-03-13 Aurel +* modify Base_getWorkflowHistoryItemList and Workflow_statusModify in order to take Message class into account + +2006-03-09 Seb +* Added try/except in Base_translateString + +2006-03-08 Kevin +* Allow Accounting Transaction and similar as subobjects of Preference but hide them (feature needed for jp's template system). +* Replace getPreferredDateInputOrder() calls by getPreferredDateOrder() +* Call Base_translateString() instead of Base_TranslateString() + +2006-03-08 JPS +* Make sure group membership is acquired through careers and subordination +* Make sure role is acquired from Career +2006-03-07 Kevin * Fix mass workflow status modification (Folder_modifyWorkflowStatus and Base_callViewDialogMethod updated). 2006-03-06 romain -- 2.30.9