changeset 009b1228e47b in modules/account:5.6
details: https://hg.tryton.org/modules/account?cmd=changeset;node=009b1228e47b
description:
        Test account is set before reading it's company

        account is empty on reconciliation without lines

        issue9684
        review322221002
        (grafted from 72bfbca78289804ed72be1d293436501abfd0054)
diffstat:

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

diffs (13 lines):

diff -r 20d1092b0973 -r 009b1228e47b move.py
--- a/move.py   Sun Aug 02 17:50:06 2020 +0200
+++ b/move.py   Fri Oct 09 21:42:41 2020 +0200
@@ -557,7 +557,8 @@
                             line=line.rec_name,
                             party1=line.party.rec_name,
                             party2=party.rec_name))
-            if not account.company.currency.is_zero(debit - credit):
+            if (account
+                    and not account.company.currency.is_zero(debit - credit)):
                 lang = Lang.get()
                 debit = lang.currency(debit, account.company.currency)
                 credit = lang.currency(credit, account.company.currency)

Reply via email to