Commit c20f5401 authored by Sebastien Robin's avatar Sebastien Robin

call the right method in order to get the state while delivering a checbkook_delivery

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17106 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 18903e58
......@@ -425,7 +425,7 @@
</item>
<item>
<key> <string>lines</string> </key>
<value> <int>10</int> </value>
<value> <int>520</int> </value>
</item>
<item>
<key> <string>list_action</string> </key>
......
......@@ -103,10 +103,14 @@ line_list = transaction.getMovementList()\n
for line in line_list:\n
aggregate_list = line.getAggregateValueList()\n
for aggregate in aggregate_list:\n
if aggregate.getValidationState() != \'draft\':\n
message = Message(domain=\'ui\', message=\'Sorry, the checkbook is not new\')\n
raise ValidationFailed, (message,)\n
if aggregate.getPortalType()==\'Check\':\n
if aggregate.getSimulationState() != \'draft\':\n
message = Message(domain=\'ui\', message=\'Sorry, the check is not new\')\n
raise ValidationFailed, (message,)\n
if aggregate.getPortalType()==\'Checkbook\':\n
if aggregate.getValidationState() != \'draft\':\n
message = Message(domain=\'ui\', message=\'Sorry, the checkbook is not new\')\n
raise ValidationFailed, (message,)\n
for check in aggregate.objectValues(portal_type=\'Check\'):\n
if check.getSimulationState() != \'draft\':\n
message = Message(domain=\'ui\',\n
......
333
\ No newline at end of file
334
\ 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