diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_delivery_workflow/scripts/checkConsistency.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_delivery_workflow/scripts/checkConsistency.xml index de271859d7e93aef5f76d113909ff5db21cc632a..1a14d32c4070992ee543a8b91e61eef4629b0e4b 100644 --- a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_delivery_workflow/scripts/checkConsistency.xml +++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_delivery_workflow/scripts/checkConsistency.xml @@ -80,6 +80,10 @@ if source is None:\n msg = Message(domain=\'ui\', message=\'No counter defined.\')\n raise ValidationFailed, (msg,)\n \n +if sum([len(x.getAggregateList()) for x in transaction.objectValues(portal_type=[\'Checkbook Delivery Line\'])]) == 0:\n + msg = Message(domain=\'ui\', message=\'No checkbook selected for delivery.\')\n + raise ValidationFailed, (msg,) \n +\n at_date = transaction.getStartDate()\n transaction.CheckbookDelivery_checkAggregateStockList(at_date=at_date, node_url = source)\n \n @@ -149,6 +153,12 @@ if not transaction.Baobab_checkCounterDateOpen(site=source, date=date):\n <string>None</string> <string>source</string> <string>msg</string> + <string>sum</string> + <string>append</string> + <string>$append0</string> + <string>_getiter_</string> + <string>x</string> + <string>len</string> <string>at_date</string> </tuple> </value> diff --git a/bt5/erp5_banking_check/bt/revision b/bt5/erp5_banking_check/bt/revision index 12e255591973bdba2df68092427a8e1f954f18dc..cde50ca2fd4ba909be88857a34e828b2d5e2373d 100644 --- a/bt5/erp5_banking_check/bt/revision +++ b/bt5/erp5_banking_check/bt/revision @@ -1 +1 @@ -177 \ No newline at end of file +179 \ No newline at end of file