Skip to content

Commit

Permalink
[WIP] l10n_do_accounting: v17 migration
Browse files Browse the repository at this point in the history
  • Loading branch information
jose-pcg committed May 15, 2024
1 parent a9c94d9 commit 9b6c5b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion 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("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:
Expand Down
5 changes: 3 additions & 2 deletions l10n_do_accounting/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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

0 comments on commit 9b6c5b5

Please sign in to comment.