From e7bbffa1344a19c5a9a119f3088b375810efe812 Mon Sep 17 00:00:00 2001 From: Daniel Reis Date: Thu, 19 Sep 2024 17:43:32 +0100 Subject: [PATCH] [MIG] l10n_pt_stock_invoicexpress: Migration to 17.0 --- l10n_pt_stock_invoicexpress/__manifest__.py | 2 +- .../models/stock_picking.py | 2 +- .../views/stock_picking_view.xml | 14 +++++--------- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/l10n_pt_stock_invoicexpress/__manifest__.py b/l10n_pt_stock_invoicexpress/__manifest__.py index f5b311ef..44b5e190 100644 --- a/l10n_pt_stock_invoicexpress/__manifest__.py +++ b/l10n_pt_stock_invoicexpress/__manifest__.py @@ -5,7 +5,7 @@ "name": "Portugal InvoiceXpress Legal Transport Documents", "summary": "Portuguese legal transport and shipping documents" " (Guias de Transporte e Guias de Remessa) generated with InvoiceXpress", - "version": "16.0.1.0.1", + "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_stock_invoicexpress/models/stock_picking.py b/l10n_pt_stock_invoicexpress/models/stock_picking.py index c9ccf802..a93a2dc8 100644 --- a/l10n_pt_stock_invoicexpress/models/stock_picking.py +++ b/l10n_pt_stock_invoicexpress/models/stock_picking.py @@ -218,7 +218,7 @@ def action_create_invoicexpress_delivery(self): values1 = response1.json().get(doctype) prefix = self._get_invoicexpress_prefix(doctype) seqnum = values1["inverted_sequence_number"] - invx_number = "%s %s" % (prefix, seqnum) + invx_number = f"{prefix} {seqnum}" delivery.invoicexpress_number = invx_number delivery._update_invoicexpress_status() diff --git a/l10n_pt_stock_invoicexpress/views/stock_picking_view.xml b/l10n_pt_stock_invoicexpress/views/stock_picking_view.xml index 18ed654b..23e38807 100644 --- a/l10n_pt_stock_invoicexpress/views/stock_picking_view.xml +++ b/l10n_pt_stock_invoicexpress/views/stock_picking_view.xml @@ -12,18 +12,15 @@ - + @@ -38,8 +35,7 @@ name="action_create_invoicexpress_delivery" string="Create InvoiceXpress" type="object" - attrs="{'invisible': ['|', '|', ('invoicexpress_id', '!=', False), - ('state', 'not in', ('assigned','done')),('can_invoicexpress', '=', False)]}" + invisible="invoicexpress_id or state not in ('assigned','done') or not can_invoicexpress" groups="base.group_no_one" /> --> @@ -48,7 +44,7 @@ name="action_send_invoicexpress_delivery" string="InvoiceXpress Email" type="object" - attrs="{'invisible': ['|', ('can_invoicexpress_email', '=', False), ('invoicexpress_id', '=', False)]}" + invisible="not can_invoicexpress_email or not invoicexpress_id" />