From 112b234f647885db25f0311f9cddc00fcd3d1ee8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poulain?= <herve@nexedi.com> Date: Thu, 8 Apr 2010 13:29:31 +0000 Subject: [PATCH] Modify the transition to do checking of price currency between bank_account and transaction, it must be the same. (fix bug number: 1242, the corresponding unit test is commited in the revision number 34386) git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34387 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../scripts/validateTransactionLines.xml | 14 +++++++------- bt5/erp5_accounting/bt/revision | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/scripts/validateTransactionLines.xml b/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/scripts/validateTransactionLines.xml index 7d3b47a770..1051adeb03 100644 --- a/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/scripts/validateTransactionLines.xml +++ b/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/scripts/validateTransactionLines.xml @@ -98,13 +98,13 @@ for line in transaction.contentValues(filter=dict(\n mapping=dict(third_party_name=unicode(\n third_party.getTitle(), \'utf8\')))\n \n - if bank_account is not None and\\\n - bank_account.getValidationState() in invalid_state_list:\n - raise ValidationFailed, translateString(\n - "Bank Account ${bank_account_reference} is invalid.",\n - mapping=dict(bank_account_reference=unicode(\n - bank_account.getReference(), \'utf8\')))\n -\n + if bank_account is not None:\n + if bank_account.getValidationState() in invalid_state_list:\n + raise ValidationFailed, translateString(\n + "Bank Account ${bank_account_reference} is invalid.",\n + mapping=dict(bank_account_reference=unicode(\n + bank_account.getReference(), \'utf8\')))\n + \n if account is not None:\n # also check that currencies are consistent if we use this quantity for\n # accounting.\n diff --git a/bt5/erp5_accounting/bt/revision b/bt5/erp5_accounting/bt/revision index 09486914e5..ed426f7f6f 100644 --- a/bt5/erp5_accounting/bt/revision +++ b/bt5/erp5_accounting/bt/revision @@ -1 +1 @@ -1155 \ No newline at end of file +1156 \ No newline at end of file -- 2.30.9