Skip to content

Commit

Permalink
[FIX] sale_order_type_ux: method get_fiscal_position return the objec…
Browse files Browse the repository at this point in the history
…t not an id
  • Loading branch information
augusto-weiss committed Oct 12, 2022
1 parent 71825db commit f1bb89c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sale_order_type_ux/models/sale_order_line.py
Expand Up @@ -27,11 +27,10 @@ def _prepare_invoice_line(self, **optional_values):
if company != self.company_id:
# Because we not have the access to the invoice, we obtain the fiscal position who
# has the invoice really
fpos_id = self.env['account.fiscal.position'].with_company(
fpos = self.env['account.fiscal.position'].with_company(
company.id).get_fiscal_position(
self.order_id.partner_id.id,
self.order_id.partner_shipping_id.id)
fpos = self.env['account.fiscal.position'].browse(fpos_id)
taxes = self.product_id.taxes_id.filtered(
lambda r: company == r.company_id)
taxes = fpos.map_tax(taxes) if fpos else taxes
Expand Down

0 comments on commit f1bb89c

Please sign in to comment.