diff --git a/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Base_viewEventList/ticket_listbox.xml b/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Base_viewEventList/ticket_listbox.xml index 82243dbeccf9ef8c1030bdf08d74054d19c17bc6..550dae5c111fc6c50e04f58579bcdaa83af5d478 100644 --- a/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Base_viewEventList/ticket_listbox.xml +++ b/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Base_viewEventList/ticket_listbox.xml @@ -119,7 +119,7 @@ <string>End Date</string> </tuple> <tuple> - <string>translated_simulation_state_title</string> + <string>Ticket_getWorkflowStateTranslatedTitle</string> <string>State</string> </tuple> </list> diff --git a/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Ticket_getWorkflowStateTranslatedTitle.py b/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Ticket_getWorkflowStateTranslatedTitle.py new file mode 100644 index 0000000000000000000000000000000000000000..aed233780733a3452247122f49e80b857f221fc9 --- /dev/null +++ b/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Ticket_getWorkflowStateTranslatedTitle.py @@ -0,0 +1,9 @@ +from Products.ERP5Type.Utils import UpperCase + +portal = context.getPortalObject() +workflow_tool = portal.portal_workflow + +for workflow in workflow_tool.getWorkflowsFor(context): + # Exclude interaction workflows and edit_workflow + if workflow.state_var != 'state': + return getattr(context, 'getTranslated%sTitle' % UpperCase(workflow.state_var))() diff --git a/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Ticket_getWorkflowStateTranslatedTitle.xml b/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Ticket_getWorkflowStateTranslatedTitle.xml new file mode 100644 index 0000000000000000000000000000000000000000..fc5272cd9e026f63639905fe639bffa53b7d7498 --- /dev/null +++ b/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Ticket_getWorkflowStateTranslatedTitle.xml @@ -0,0 +1,70 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>_proxy_roles</string> </key> + <value> + <tuple> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>Ticket_getWorkflowStateTranslatedTitle</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData>