diff --git a/l10n_pt_account_invoicexpress/__manifest__.py b/l10n_pt_account_invoicexpress/__manifest__.py index 9d756d15..318d892a 100644 --- a/l10n_pt_account_invoicexpress/__manifest__.py +++ b/l10n_pt_account_invoicexpress/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Portugal InvoiceXpress Integration", "summary": "Portuguese certified invoices using InvoiceXpress", - "version": "16.0.1.2.3", + "version": "17.0.1.0.0", "author": "Open Source Integrators, Odoo Community Association (OCA)", "license": "AGPL-3", "website": "https://github.com/OCA/l10n-portugal", diff --git a/l10n_pt_account_invoicexpress/models/account_move.py b/l10n_pt_account_invoicexpress/models/account_move.py index a15d8b51..92b41528 100644 --- a/l10n_pt_account_invoicexpress/models/account_move.py +++ b/l10n_pt_account_invoicexpress/models/account_move.py @@ -110,7 +110,7 @@ def _get_invoicexpress_prefix(self, doctype): def _prepare_invoicexpress_lines(self): # FIXME: set user lang, based on country? lines = self.invoice_line_ids.filtered( - lambda l: l.display_type not in ("line_section", "line_note") + lambda x: x.display_type not in ("line_section", "line_note") ) # Ensure Taxes are created on InvoiceXpress lines.mapped("tax_ids").action_invoicexpress_tax_create() @@ -119,8 +119,10 @@ def _prepare_invoicexpress_lines(self): tax = line.tax_ids[:1] # If not tax set, force zero VAT tax_detail = {"name": tax.name or "IVA0", "value": tax.amount or 0.0} - # Because InvoiceXpress expects unit_price in EUR, check if we need to convert - # line currency to company currency (company should use EUR as default currency) + # Because InvoiceXpress expects unit_price in EUR, + # check if we need to convert + # line currency to company currency + # (company should use EUR as default currency) if line.currency_id == line.company_id.currency_id: price_unit = line.price_unit else: @@ -238,7 +240,7 @@ def action_create_invoicexpress_invoice(self): ) ) prefix = self._get_invoicexpress_prefix(doctype) - invx_number = "%s %s" % (prefix, seqnum) if prefix else seqnum + invx_number = f"{'prefix'}, {'seqnum'}" if prefix else seqnum if invoice.payment_reference == invoice.name: invoice.payment_reference = invx_number invoice.name = invx_number