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

[15.0][FIX] l10n_pt_vat: do not throw error if the line is a note or a section #112

Merged
merged 1 commit into from
Sep 19, 2024
Merged
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
3 changes: 2 additions & 1 deletion l10n_pt_vat/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ def action_post(self):
lambda x: x.country_code == "PT" and x.is_sale_document()
):
exempt_lines = invoice.invoice_line_ids.filtered(
lambda x: not x.tax_ids.filtered("amount")
lambda x: x.display_type not in ["line_section", "line_note"]
and not x.tax_ids.filtered("amount")
)
if exempt_lines and not invoice.l10npt_vat_exempt_reason:
raise exceptions.ValidationError(
Expand Down
Loading