From 9b6c5b54e8e007a4443641123d6a92c723e0bece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20L=C3=B3pez?= Date: Wed, 15 May 2024 16:06:32 -0400 Subject: [PATCH] [WIP] l10n_do_accounting: v17 migration --- l10n_do_accounting/models/account_move_line.py | 3 ++- l10n_do_accounting/models/res_partner.py | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/l10n_do_accounting/models/account_move_line.py b/l10n_do_accounting/models/account_move_line.py index 84fa173a..b1cd1679 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("l10n_do.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: diff --git a/l10n_do_accounting/models/res_partner.py b/l10n_do_accounting/models/res_partner.py index a6e4de4c..c2a4352a 100644 --- a/l10n_do_accounting/models/res_partner.py +++ b/l10n_do_accounting/models/res_partner.py @@ -121,7 +121,9 @@ def _compute_l10n_do_dgii_payer_type(self): partner.l10n_do_dgii_tax_payer_type = "governmental" elif "ZONA FRANCA" in upper_name: partner.l10n_do_dgii_tax_payer_type = "special" - elif "IGLESIA" in upper_name or ("MINISTERIO" in upper_name and vat.startswith("4")): + elif "IGLESIA" in upper_name or ( + "MINISTERIO" in upper_name and vat.startswith("4") + ): partner.l10n_do_dgii_tax_payer_type = "special" elif not vat.startswith("4"): partner.l10n_do_dgii_tax_payer_type = "taxpayer" @@ -130,7 +132,6 @@ def _compute_l10n_do_dgii_payer_type(self): else: partner.l10n_do_dgii_tax_payer_type = "non_payer" - def _inverse_l10n_do_dgii_tax_payer_type(self): for partner in self: partner.l10n_do_dgii_tax_payer_type = partner.l10n_do_dgii_tax_payer_type