Check the right account in the journal when paying in_invoices

issue2376
review218001
This commit is contained in:
Robin Baumgartner committed 2012-01-09 08:38:50 +01:00
1 parent a397170d1d
commit c14554496e
1 file changed
+1 -1
+1 -1
View File
@@ -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')