changeset 0a4d82fee1bf in modules/account_invoice:default
details: 
https://hg.tryton.org/modules/account_invoice?cmd=changeset;node=0a4d82fee1bf
description:
        Use current account when paying invoice

        issue8540
        review277631003
diffstat:

 invoice.py |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r 3f95d21c3513 -r 0a4d82fee1bf invoice.py
--- a/invoice.py        Fri Jul 26 09:44:39 2019 +0200
+++ b/invoice.py        Wed Jul 31 09:18:28 2019 +0200
@@ -1215,7 +1215,8 @@
             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:

Reply via email to