Commit de0c821e authored by Vincent Pelletier's avatar Vincent Pelletier

Check that there are checkbook selected for delivery to allow validating the delivery.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14379 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7853a097
......@@ -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>
......
177
\ No newline at end of file
179
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment