Skip to content

Commit

Permalink
[IMP] sale_ux: update taxes when position fiscal change
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasperalta1 committed Apr 19, 2023
1 parent edf3e3d commit 7ffcea2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sale_ux/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ def _onchange_pricelist_id_show_update_prices(self):
'show_update_pricelist': False,
})

@api.onchange('fiscal_position_id')
def _onchange_fiscal_position_id(self):
self.ensure_one()
lines_to_recompute = self.order_line.filtered(lambda line: not line.display_type)
lines_to_recompute._compute_tax_id()
self.show_update_fpos = False

def action_cancel(self):
invoices = self.mapped('invoice_ids').filtered(
lambda x: x.state not in ['cancel', 'draft'])
Expand Down

0 comments on commit 7ffcea2

Please sign in to comment.