Skip to content

Commit

Permalink
[REF] l10n_pt_account_invoicexpress: control when to use PT VAT features
Browse files Browse the repository at this point in the history
  • Loading branch information
dreispt committed Dec 9, 2023
1 parent d33b103 commit becd613
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions l10n_pt_account_invoicexpress/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ def _compute_invoicexpress_doc_type(self):
" If unset, InvoiceXpress will not be used.",
)

def _compute_is_l10npt_vat_enabled(self):
super()._compute_is_l10npt_vat_enabled()
# Disable VAT PT options is InvoiceXpress is disabled
for invoice in self.filtered("invoice.is_l10n_vat_enabled"):
if not invoice.can_invoicexpress:
invoice.is_l10npt_vat_enabled = False

@api.constrains("journal_id", "company_id")
def _check_invoicexpress_doctype_config(self):
"""
Expand Down

0 comments on commit becd613

Please sign in to comment.