From f63fed5caf40e0fbc3bd7c008a046b0c12bbb1e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Vanhaudenard?= Date: Thu, 15 Jul 2021 08:29:01 +0000 Subject: [PATCH] [FIX] point_of_sale: Don't reconcile already reconciled lines At the closing of the POS, we try to reconcile all lines involved in the closing. If for any reason, a line is already reconciled (I.E. Debit=0 and Credit=0 is considered as reconciled), the closing fails because we cannot reconcile an already reconciled line. OPW-2602410 closes odoo/odoo#73783 X-original-commit: 4fd374b3f97eee1e706842ce1e28d0ad7a50315a Signed-off-by: pimodoo --- addons/point_of_sale/models/pos_session.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/models/pos_session.py b/addons/point_of_sale/models/pos_session.py index b4c9930a353..a3fedfe734c 100644 --- a/addons/point_of_sale/models/pos_session.py +++ b/addons/point_of_sale/models/pos_session.py @@ -753,7 +753,7 @@ class PosSession(models.Model): | combine_cash_receivable_lines[statement] ) accounts = all_lines.mapped('account_id') - lines_by_account = [all_lines.filtered(lambda l: l.account_id == account) for account in accounts] + lines_by_account = [all_lines.filtered(lambda l: l.account_id == account and not l.reconciled) for account in accounts] for lines in lines_by_account: lines.reconcile() # We try to validate the statement after the reconciliation is done