From 2015647285ec6121a28144fad9c37883ca0708fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 10 May 2023 13:14:00 +0200 Subject: [PATCH] Do not fail on missing writeoff account for reconciliation There is no need to check for second currency if there is no account. --- modules/account/move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/account/move.py b/modules/account/move.py index 363f523df5..a275df67fc 100644 --- a/modules/account/move.py +++ b/modules/account/move.py @@ -1607,7 +1607,7 @@ class Line(MoveLineMixin, ModelSQL, ModelView): reconcile_party if account and account.party_required else None) line.debit = amount if amount > 0 else 0 line.credit = -amount if amount < 0 else 0 - if account.second_currency: + if account and account.second_currency: with Transaction().set_context(date=date): line.amount_second_currency = Currency.compute( company.currency, amount,