From e48510503f27eb2b49745816d86c828fb572e58c Mon Sep 17 00:00:00 2001 From: Richard Vong Date: Fri, 28 Jun 2024 00:59:01 +0200 Subject: [PATCH] Do not try to reconcile posted lines without debit/credit but with second currency amount Closes #13293 --- modules/account/move.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/account/move.py b/modules/account/move.py index 8e551beb8a..cb7909c456 100644 --- a/modules/account/move.py +++ b/modules/account/move.py @@ -491,7 +491,10 @@ class Move(DescriptionOriginMixin, ModelSQL, ModelView): line.id, where=reduce_ids(line.move, sub_moves_ids) & (line.debit == Decimal(0)) - & (line.credit == Decimal(0)))) + & (line.credit == Decimal(0)) + & ((line.amount_second_currency == Null) + | (line.amount_second_currency == Decimal(0))) + )) to_reconcile.extend(l for l, in cursor) for move in moves: