From aec03f357ac7b3e2a12d9222e3f2391d86a1bca1 Mon Sep 17 00:00:00 2001 From: Marco Colombo Date: Fri, 18 Jun 2021 14:54:42 +0200 Subject: [PATCH] [FIX] l10n_it_split_payment: fix payment lines Force recompute of all fields instead of just debit/credit. Fix a failure in l10n_it_fatturapa_out_sp tests. --- l10n_it_split_payment/models/account.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/l10n_it_split_payment/models/account.py b/l10n_it_split_payment/models/account.py index c2e2e29b6037..2ffc5da5a86e 100644 --- a/l10n_it_split_payment/models/account.py +++ b/l10n_it_split_payment/models/account.py @@ -88,7 +88,7 @@ def set_receivable_line_ids(self): else: receivable_line_amount = 0 line_client.with_context(check_move_validity=False).update( - {"debit": receivable_line_amount} + {"price_unit": -receivable_line_amount} ) elif self.move_type == "out_refund": for line_client in line_client_ids: @@ -100,7 +100,7 @@ def set_receivable_line_ids(self): else: receivable_line_amount = 0 line_client.with_context(check_move_validity=False).update( - {"credit": receivable_line_amount} + {"price_unit": receivable_line_amount} ) def _compute_split_payments(self):