Skip to content

Commit

Permalink
[FIX] l10n_it_split_payment: fix the following use case scenario.
Browse files Browse the repository at this point in the history
Steps to reproduce:

* choose partner with fiscal position (Split Payment = True)
* create an invoice with a line
* edit the price unit

Current behavior:

See https://user-images.githubusercontent.com/3512779/179964568-955cbe00-5346-4532-a53b-efa1b1eb663e.gif for further info
  • Loading branch information
tafaRU committed Jul 22, 2022
1 parent 5e59b4c commit 6b03b4d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions l10n_it_split_payment/models/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ def _compute_split_payments(self):
write_off_line_vals["price_unit"],
precision_rounding=self.currency_id.rounding,
):
line_sp.with_context(check_move_validity=False).update(
line_sp = line_sp.with_context(check_move_validity=False)
line_sp.update(
{
"price_unit": 0.0,
"amount_currency": 0.0,
Expand All @@ -138,7 +139,8 @@ def _compute_split_payments(self):
write_off_line_vals["price_unit"],
precision_rounding=self.currency_id.rounding,
):
line_sp.with_context(check_move_validity=False).update(
line_sp = line_sp.with_context(check_move_validity=False)
line_sp.update(
{
"price_unit": 0.0,
"amount_currency": 0.0,
Expand Down
1 change: 1 addition & 0 deletions l10n_it_split_payment/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
* Giacomo Grasso <giacomo.grasso.82@gmail.com>
* Ruben Tonetto <https://github.com/ruben-tonetto>
* Giuseppe Borruso - Dinamiche Aziendali srl <gborruso@dinamicheaziendali.it>
* Alex Comba <alex.comba@agilebg.com>

0 comments on commit 6b03b4d

Please sign in to comment.