diff --git a/bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/event_workflow/scripts/Event_checkConsistencyForAcknowledge.xml b/bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/event_workflow/scripts/Event_checkConsistencyForAcknowledge.xml new file mode 100644 index 0000000000000000000000000000000000000000..def6c0312b9cf7abb2ac2571443d1f303265c117 --- /dev/null +++ b/bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/event_workflow/scripts/Event_checkConsistencyForAcknowledge.xml @@ -0,0 +1,136 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + <tuple/> + </tuple> + </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>_body</string> </key> + <value> <string>from Products.DCWorkflow.DCWorkflow import ValidationFailed\n +from Products.ERP5Type.Message import translateString\n +\n +container.Event_checkConsistency(sci)\n +\n +event = sci[\'object\']\n +if not event.getFollowUp():\n + raise ValidationFailed(translateString(\'Follow up must be set to acknowledge an Event.\'))\n +</string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>sci</string> </value> + </item> + <item> + <key> <string>errors</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>func_code</string> </key> + <value> + <object> + <klass> + <global name="FuncCode" module="Shared.DC.Scripts.Signature"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>co_argcount</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>sci</string> + <string>Products.DCWorkflow.DCWorkflow</string> + <string>ValidationFailed</string> + <string>Products.ERP5Type.Message</string> + <string>translateString</string> + <string>_getattr_</string> + <string>container</string> + <string>_getitem_</string> + <string>event</string> + </tuple> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>func_defaults</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>Event_checkConsistencyForAcknowledge</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/event_workflow/transitions/acknowledge_action.xml b/bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/event_workflow/transitions/acknowledge_action.xml index b830844bf1912c0dc80d1d434bb267643b18bdde..b42fafe578cdc1761c85a93c67a7b12321a34d96 100644 --- a/bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/event_workflow/transitions/acknowledge_action.xml +++ b/bt5/erp5_crm/WorkflowTemplateItem/portal_workflow/event_workflow/transitions/acknowledge_action.xml @@ -45,7 +45,7 @@ </item> <item> <key> <string>script_name</string> </key> - <value> <string></string> </value> + <value> <string>Event_checkConsistencyForAcknowledge</string> </value> </item> <item> <key> <string>title</string> </key> diff --git a/bt5/erp5_crm/bt/revision b/bt5/erp5_crm/bt/revision index 3bac779c0a09053c4968ba844b98e5dc7abb43f7..815f89dbff57f71546ebd5fd99ef7c31fb8c2901 100644 --- a/bt5/erp5_crm/bt/revision +++ b/bt5/erp5_crm/bt/revision @@ -1 +1 @@ -310 \ No newline at end of file +311 \ No newline at end of file