Skip to content

Commit

Permalink
[FIX] l10n_it_split_payment: fix payment lines
Browse files Browse the repository at this point in the history
Force recompute of all fields instead of just debit/credit.
Fix a failure in l10n_it_fatturapa_out_sp tests.
  • Loading branch information
TheMule71 committed Jul 16, 2021
1 parent 91eac51 commit eb4eeae
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions l10n_it_split_payment/models/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ 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:
Expand All @@ -100,7 +102,9 @@ 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):
Expand Down

0 comments on commit eb4eeae

Please sign in to comment.