Skip to content

Commit

Permalink
[FIX]|l10n_do_accounting: fix external id referece to tax groups base…
Browse files Browse the repository at this point in the history
… on company id
  • Loading branch information
festovalros committed Jul 16, 2024
1 parent 5e9dbcc commit 5aeaae2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions l10n_do_accounting/models/account_move_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ def _compute_totals(self):

if line.move_id.is_ecf_invoice:
line_itbis_taxes = line.tax_ids.filtered(
lambda t: t.tax_group_id == self.env.ref("account.1_group_itbis")
lambda t: t.tax_group_id
== self.env.ref("account.%s_tax_group_itbis" % line.company_id.id)
)
price_unit = line.price_unit
if line.discount:
Expand All @@ -35,8 +36,8 @@ def _compute_totals(self):
)

def _get_l10n_do_line_amounts(self):
group_itbis = self.env.ref("account.1_group_itbis")
group_isr = self.env.ref("account.1_group_isr")
group_itbis = self.env.ref("account.%s_tax_group_itbis" % self.company_id.id)
group_isr = self.env.ref("account.%s_tax_group_isr" % self.company_id.id)

tax_lines = self.filtered(
lambda x: x.tax_group_id.id
Expand Down

0 comments on commit 5aeaae2

Please sign in to comment.