Test account is set before reading it's company

account is empty on reconciliation without lines

issue9684
review322221002
This commit is contained in:
Sergi Almacellas Abellana committed 2020-10-09 21:42:41 +02:00
1 parent 603b8880e5
commit ac2d7f99c2
1 file changed
+2 -1
+2 -1
View File
@@ -557,7 +557,8 @@ class Reconciliation(ModelSQL, ModelView):
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)