Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][FIX] Sum other taxes to invoice total #1197

Open
wants to merge 1 commit into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion l10n_do_accounting/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"category": "Localization",
"license": "LGPL-3",
"website": "https://github.com/odoo-dominicana",
"version": "17.0.1.0.4",
"version": "17.0.1.0.5",
"countries": ["do"],
# any module necessary for this one to work correctly
"depends": ["l10n_latam_invoice_document", "l10n_do"],
Expand Down
7 changes: 7 additions & 0 deletions l10n_do_accounting/models/account_move_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ def _get_l10n_do_line_amounts(self):
taxed_lines = invoice_line_ids.filtered(
lambda x: x.tax_ids and any(tax for tax in x.tax_ids if tax.amount)
)
other_taxes_lines = self.filtered(
lambda x: x.tax_line_id and x.tax_line_id.tax_group_id not in [group_itbis, group_isr]
)
other_taxes_amount = sum(
abs(self.currency_id.round(line.amount_currency)) for line in other_taxes_lines
)
exempt_lines = invoice_line_ids.filtered(
lambda x: not x.tax_ids or any(tax for tax in x.tax_ids if not tax.amount)
)
Expand Down Expand Up @@ -136,6 +142,7 @@ def _get_l10n_do_line_amounts(self):
+ result["itbis_18_tax_amount"]
+ result["itbis_16_tax_amount"]
+ result["itbis_0_tax_amount"]
+ other_taxes_amount
)

if self.currency_id != self.company_id.currency_id:
Expand Down
Loading