Skip to content

Commit

Permalink
Merge 7125ed4 into e63bb39
Browse files Browse the repository at this point in the history
  • Loading branch information
legalsylvain committed May 21, 2019
2 parents e63bb39 + 7125ed4 commit 517d903
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions invoice_fiscal_position_update/account_invoice.py
Expand Up @@ -32,6 +32,7 @@ class account_invoice(models.Model):
def fiscal_position_change(self):
"""Updates taxes and accounts on all invoice lines"""
self.ensure_one()
AccountTax = self.env['account.tax']
res = {}
lines_without_product = []
fp = self.fiscal_position
Expand All @@ -54,6 +55,10 @@ def fiscal_position_change(self):
account = fp.map_account(account)
taxes = fp.map_tax(taxes)

line.price_unit = AccountTax._fix_tax_included_price(
line.price_unit,
line.invoice_line_tax_id,
taxes.ids)
line.invoice_line_tax_id = [(6, 0, taxes.ids)]
line.account_id = account.id
else:
Expand Down

0 comments on commit 517d903

Please sign in to comment.