From df75a41eb0caefb760ce982547ffcf744bfc9ec4 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Wed, 31 Jul 2019 09:18:28 +0200 Subject: [PATCH] Use current account when paying invoice issue8540 review277631003 --- invoice.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/invoice.py b/invoice.py index 8acdfc7fcd..6c50c23f11 100644 --- a/invoice.py +++ b/invoice.py @@ -1215,7 +1215,8 @@ class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin): payment_acccount = 'debit_account' else: payment_acccount = 'credit_account' - line2.account = getattr(payment_method, payment_acccount) + line2.account = getattr(payment_method, payment_acccount).current( + date=date) for line in lines: if line.account.party_required: