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 index def6c0312b9cf7abb2ac2571443d1f303265c117..7b2120832bc22fd68fa61517d31812b20ba48ea0 100644 --- 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 @@ -58,7 +58,22 @@ from Products.ERP5Type.Message import translateString\n \n container.Event_checkConsistency(sci)\n \n +portal = sci.getPortal()\n +portal_workflow = portal.portal_workflow\n event = sci[\'object\']\n +\n +follow_up_ticket_type = portal_workflow.getInfoFor(event,\n + \'follow_up_ticket_type\',\n + wf_id=\'event_workflow\')\n +\n +follow_up_ticket_title = portal_workflow.getInfoFor(event,\n + \'follow_up_ticket_title\',\n + wf_id=\'event_workflow\')\n +\n +if follow_up_ticket_type not in ["", None] and \\\n + follow_up_ticket_title not in ["", None]:\n + return \n +\n if not event.getFollowUp():\n raise ValidationFailed(translateString(\'Follow up must be set to acknowledge an Event.\'))\n </string> </value> @@ -104,8 +119,13 @@ if not event.getFollowUp():\n <string>translateString</string> <string>_getattr_</string> <string>container</string> + <string>portal</string> + <string>portal_workflow</string> <string>_getitem_</string> <string>event</string> + <string>follow_up_ticket_type</string> + <string>follow_up_ticket_title</string> + <string>None</string> </tuple> </value> </item> diff --git a/bt5/erp5_crm/bt/revision b/bt5/erp5_crm/bt/revision index 662d98cc9235552d5e3cd90c5ffc1983edf4bf2e..3fa694f2455f39f033c48543cf4f6fed6f637488 100644 --- a/bt5/erp5_crm/bt/revision +++ b/bt5/erp5_crm/bt/revision @@ -1 +1 @@ -436 \ No newline at end of file +437 \ No newline at end of file