diff --git a/l10n_do_accounting/models/account_move_line.py b/l10n_do_accounting/models/account_move_line.py index fa27fa72f..c95e70038 100644 --- a/l10n_do_accounting/models/account_move_line.py +++ b/l10n_do_accounting/models/account_move_line.py @@ -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: @@ -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