From c14554496e7c5567fbfb7888dcd40ef0e621a4c2 Mon Sep 17 00:00:00 2001 From: Robin Baumgartner Date: Mon, 9 Jan 2012 08:38:50 +0100 Subject: [PATCH] Check the right account in the journal when paying in_invoices issue2376 review218001 --- invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invoice.py b/invoice.py index 435e9037f7..64599a6c19 100644 --- a/invoice.py +++ b/invoice.py @@ -1139,7 +1139,7 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView): 'amount_second_currency': amount_second_currency, 'second_currency': second_currency, }) - if invoice.account.id == journal.debit_account.id: + if invoice.account.id == journal.credit_account.id: self.raise_user_error('same_credit_account') if not journal.credit_account: self.raise_user_error('missing_credit_account')