diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createClosingTransaction.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createClosingTransaction.xml
index 72cce30e1578b148d2162fe5f942db6ce46b287b..f89e0a513434118087b1ee7203f8cb52ef1150ec 100644
--- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createClosingTransaction.xml
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_createClosingTransaction.xml
@@ -88,7 +88,7 @@ N_ = portal.Base_translateString\n
 # FIXME: maybe it is not good to use a Organisation here and not\n
 # a category ...\n
 if section is None:\n
-  section = portal_preferences.getPreferredSourceSection()\n
+  section = portal.portal_preferences.getPreferredSourceSection()\n
   if section is None:\n
     raise ValueError, N_(\'Section must be defined in Preferences\')\n
 \n
diff --git a/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/scripts/validateBudget.xml b/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/scripts/validateBudget.xml
index 13eb0de331a65a066c8b2da5d0ab954f5f21445d..181da581e164f4e8d585858bd8fde9870746efd4 100644
--- a/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/scripts/validateBudget.xml
+++ b/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/scripts/validateBudget.xml
@@ -70,6 +70,7 @@
             <key> <string>_body</string> </key>
             <value> <string encoding="cdata"><![CDATA[
 
+from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
 """ This scripts validate that this transaction fits in the defined budget. It requires erp5_budget.\n
 """\n
 transaction = state_change[\'object\']\n
diff --git a/bt5/erp5_accounting/bt/revision b/bt5/erp5_accounting/bt/revision
index ffe78b01d3481bcc070397843292a6328857d817..50b04dff0ea766f7fa6d8487eec7ff0a9a3611b8 100644
--- a/bt5/erp5_accounting/bt/revision
+++ b/bt5/erp5_accounting/bt/revision
@@ -1 +1 @@
-401
\ No newline at end of file
+402
\ No newline at end of file