Skip to content

Commit

Permalink
[FIX] l10n_pt_vat: do not throw error if the line is a note or a section
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon COLLIN authored and dreispt committed Apr 18, 2024
1 parent 5d4a664 commit 3dab7c0
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit 3dab7c0

Please sign in to comment.