Skip to content

Commit

Permalink
[FIX] l10n_pt_account_invoicexpress: VAT MOSS doc type no longer used
Browse files Browse the repository at this point in the history
  • Loading branch information
dreispt committed Feb 7, 2023
1 parent 5948dff commit aaf6337
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions l10n_pt_account_invoicexpress/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,12 @@ def _compute_invoicexpress_doc_type(self):
invoices = self.filtered("journal_id.use_invoicexpress")
for invoice in invoices:
doctype = invoice.journal_id.invoicexpress_doc_type
europe = self.env.ref("base.europe")
country = invoice.partner_shipping_id.country_id
is_eu = country and country.code != "PT" and country in europe.country_ids
if not doctype or doctype == "none":
res = None
elif invoice.move_type == "out_refund":
res = "vat_moss_credit_note" if is_eu else "credit_note"
res = "credit_note"
else:
res = "vat_moss_invoice" if is_eu else doctype
res = doctype
invoice.invoicexpress_doc_type = res

journal_type = fields.Selection(
Expand Down
2 changes: 1 addition & 1 deletion l10n_pt_account_invoicexpress/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Generate Portuguese tax authority legal Invoices ("Faturas") using InvoiceXpress
Invoices:

- Added support to the different documents types:
Invoice, Invoice Receipt, Simplified Invoice and VAT MOSS.
Invoice, Invoice Receipt, Simplified Invoice.
The default document type is set on the Journal,
and can be changed on the Invoice form.

Expand Down

0 comments on commit aaf6337

Please sign in to comment.