Skip to content

Commit

Permalink
[FIX] l10n_br_sale:ind_final after partner invoice
Browse files Browse the repository at this point in the history
  • Loading branch information
mbcosta committed Nov 29, 2024
1 parent dd642db commit f170cb8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions l10n_br_sale/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,3 +269,12 @@ def _get_fiscal_partner(self):
partner = self.partner_invoice_id

return partner

@api.onchange("partner_id")
def _onchange_partner_id_fiscal(self):
if self.partner_id:
# Necessário chamar o onchange para preencher o partner_invoice_id
# antes do Mix Fiscal e ter o ind_final correto
# TODO: teria outra forma com menos código?
self.onchange_partner_id()
return super()._onchange_partner_id_fiscal()

0 comments on commit f170cb8

Please sign in to comment.