diff --git a/modules/account/move.py b/modules/account/move.py index 43243aede1..afce4e9aab 100644 --- a/modules/account/move.py +++ b/modules/account/move.py @@ -2003,7 +2003,7 @@ class ReconcileLines(Wizard): def get_writeoff(self): "Return writeoff amount and company" - company = None + company = currency = None amount = Decimal('0.0') amount_second_currency = Decimal('0.0') second_currencies = set() @@ -2014,6 +2014,7 @@ class ReconcileLines(Wizard): second_currencies.add(line.second_currency) if not company: company = line.account.company + currency = company.currency try: second_currency, = second_currencies except ValueError: @@ -2021,8 +2022,6 @@ class ReconcileLines(Wizard): if second_currency: amount = amount_second_currency currency = second_currency - else: - currency = company.currency return amount, currency, company def transition_start(self):