[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 <las@odoo.com>
Signed-off-by: Claire Bretton <clbr@odoo.com>
This commit is contained in:
Claire Bretton (clbr)
2023-05-30 11:46:39 +02:00
parent 18881dc0f8
commit b58babe25d
+1 -1
View File
@@ -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: