From b58babe25d3a08d3a982b7e2028aecbe0c48cfea Mon Sep 17 00:00:00 2001 From: "Claire Bretton (clbr)" Date: Mon, 22 May 2023 12:00:40 +0000 Subject: [PATCH] [FIX] account: sign error in reconciliation Fix a sign error in reconciliation that happened when reconciling items in foreign currency and a not fully matched credit, causing inconsistent partial amounts. closes odoo/odoo#122674 X-original-commit: 8cdc874b4a826b022930ef8e03bda1afae4e4ba6 Related: odoo/enterprise#41580 Signed-off-by: Laurent Smet Signed-off-by: Claire Bretton --- addons/account/models/account_move_line.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_move_line.py b/addons/account/models/account_move_line.py index b1b467c711a..8bc81fdad07 100644 --- a/addons/account/models/account_move_line.py +++ b/addons/account/models/account_move_line.py @@ -1868,7 +1868,7 @@ class AccountMoveLine(models.Model): if not company_currency.is_zero(credit_exchange_amount): exchange_lines_to_fix += credit_aml amounts_list.append({'amount_residual': credit_exchange_amount}) - remaining_credit_amount += credit_exchange_amount + remaining_credit_amount -= credit_exchange_amount if credit_currency == company_currency: remaining_credit_amount_curr -= credit_exchange_amount else: