From 94cd2efec85503f74d00931a9e0b956a4241d73d Mon Sep 17 00:00:00 2001
From: Vincent Pelletier <vincent@nexedi.com>
Date: Wed, 9 May 2007 08:52:09 +0000
Subject: [PATCH] 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
---
 .../scripts/updateBankingOperation.xml                      | 6 ++++--
 bt5/erp5_banking_check/bt/revision                          | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/updateBankingOperation.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/updateBankingOperation.xml
index 7dae0f710f..cf7ba29464 100644
--- a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/updateBankingOperation.xml
+++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/updateBankingOperation.xml
@@ -67,6 +67,7 @@
             <key> <string>_body</string> </key>
             <value> <string># Note: this script is executed with the proxy role Manager, because this script needs\n
 #       to use checkbook_module.\n
+from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
 from Products.ERP5Type.Message import Message\n
 \n
 transaction = state_change[\'object\']\n
@@ -76,7 +77,7 @@ check_number = transaction.getAggregateFreeText()\n
 \n
 check = transaction.Base_checkOrCreateCheck(reference=check_number)\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
 line = transaction.get(\'movement\')\n
 if line is not None and line.getPortalType() == \'Banking Operation Line\':\n
@@ -141,6 +142,8 @@ transaction.edit(aggregate = check.getRelativeUrl())\n
                         <value>
                           <tuple>
                             <string>state_change</string>
+                            <string>Products.DCWorkflow.DCWorkflow</string>
+                            <string>ValidationFailed</string>
                             <string>Products.ERP5Type.Message</string>
                             <string>Message</string>
                             <string>_getitem_</string>
@@ -149,7 +152,6 @@ transaction.edit(aggregate = check.getRelativeUrl())\n
                             <string>bank_account</string>
                             <string>check_number</string>
                             <string>check</string>
-                            <string>ValidationError</string>
                             <string>line</string>
                             <string>None</string>
                           </tuple>
diff --git a/bt5/erp5_banking_check/bt/revision b/bt5/erp5_banking_check/bt/revision
index cb37cb5c1f..e3e1916cf5 100644
--- a/bt5/erp5_banking_check/bt/revision
+++ b/bt5/erp5_banking_check/bt/revision
@@ -1 +1 @@
-186
\ No newline at end of file
+187
\ No newline at end of file
-- 
2.30.9