Commit 94cd2efe authored by Vincent Pelletier's avatar Vincent Pelletier

Fix a missing import and a misspelled exception.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14428 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4d21d4af
...@@ -67,6 +67,7 @@ ...@@ -67,6 +67,7 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string># Note: this script is executed with the proxy role Manager, because this script needs\n <value> <string># Note: this script is executed with the proxy role Manager, because this script needs\n
# to use checkbook_module.\n # to use checkbook_module.\n
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
from Products.ERP5Type.Message import Message\n from Products.ERP5Type.Message import Message\n
\n \n
transaction = state_change[\'object\']\n transaction = state_change[\'object\']\n
...@@ -76,7 +77,7 @@ check_number = transaction.getAggregateFreeText()\n ...@@ -76,7 +77,7 @@ check_number = transaction.getAggregateFreeText()\n
\n \n
check = transaction.Base_checkOrCreateCheck(reference=check_number)\n check = transaction.Base_checkOrCreateCheck(reference=check_number)\n
if not check.Check_isValid():\n if not check.Check_isValid():\n
raise ValidationError, Message(domain=\'ui\', message=\'Check is in an invalid state\')\n raise ValidationFailed, Message(domain=\'ui\', message=\'Check is in an invalid state\')\n
\n \n
line = transaction.get(\'movement\')\n line = transaction.get(\'movement\')\n
if line is not None and line.getPortalType() == \'Banking Operation Line\':\n if line is not None and line.getPortalType() == \'Banking Operation Line\':\n
...@@ -141,6 +142,8 @@ transaction.edit(aggregate = check.getRelativeUrl())\n ...@@ -141,6 +142,8 @@ transaction.edit(aggregate = check.getRelativeUrl())\n
<value> <value>
<tuple> <tuple>
<string>state_change</string> <string>state_change</string>
<string>Products.DCWorkflow.DCWorkflow</string>
<string>ValidationFailed</string>
<string>Products.ERP5Type.Message</string> <string>Products.ERP5Type.Message</string>
<string>Message</string> <string>Message</string>
<string>_getitem_</string> <string>_getitem_</string>
...@@ -149,7 +152,6 @@ transaction.edit(aggregate = check.getRelativeUrl())\n ...@@ -149,7 +152,6 @@ transaction.edit(aggregate = check.getRelativeUrl())\n
<string>bank_account</string> <string>bank_account</string>
<string>check_number</string> <string>check_number</string>
<string>check</string> <string>check</string>
<string>ValidationError</string>
<string>line</string> <string>line</string>
<string>None</string> <string>None</string>
</tuple> </tuple>
......
186 187
\ No newline at end of file \ 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