From 5b1dccba3a09bc56352b4ed7afad6327c3ce2d02 Mon Sep 17 00:00:00 2001 From: Daniel Reis Date: Thu, 19 Sep 2024 17:28:06 +0100 Subject: [PATCH] [MIG] l10n_pt_vat: Migration to 17.0 --- l10n_pt_vat/__manifest__.py | 2 +- l10n_pt_vat/models/l10n_pt_vat_exempt_reason.py | 5 +++-- l10n_pt_vat/views/account_journal_view.xml | 2 +- l10n_pt_vat/views/account_move_view.xml | 5 ++--- l10n_pt_vat/views/vat_adjustment_norm_view.xml | 2 -- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/l10n_pt_vat/__manifest__.py b/l10n_pt_vat/__manifest__.py index 48eb7f16..39f03863 100644 --- a/l10n_pt_vat/__manifest__.py +++ b/l10n_pt_vat/__manifest__.py @@ -3,7 +3,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Portugal - IVA", - "version": "16.0.1.1.0", + "version": "17.0.1.0.0", "license": "AGPL-3", "author": "Open Source Integrators, Sossia, Odoo Community Association (OCA)", "summary": "Portuguese VAT requirements extensions", diff --git a/l10n_pt_vat/models/l10n_pt_vat_exempt_reason.py b/l10n_pt_vat/models/l10n_pt_vat_exempt_reason.py index e0809541..37b1e46e 100644 --- a/l10n_pt_vat/models/l10n_pt_vat_exempt_reason.py +++ b/l10n_pt_vat/models/l10n_pt_vat_exempt_reason.py @@ -16,14 +16,15 @@ class VatExemptReason(models.Model): note = fields.Text(string="Description") def name_get(self): - return [(x.id, "[%s] %s" % (x.code, x.name)) for x in self] + return [(x.id, f"[{'x.code'}] {'x.name'}") for x in self] @api.model def _name_search( self, name, args=None, operator="ilike", limit=100, name_get_uid=None ): """ - Returns a list of tuples containing id, name, as internally it is called {def name_get} + Returns a list of tuples containing id, name, + as internally it is called <> result format: {[(id, name), (id, name), ...]} """ args = args or [] diff --git a/l10n_pt_vat/views/account_journal_view.xml b/l10n_pt_vat/views/account_journal_view.xml index c4f7504e..ca3bedac 100644 --- a/l10n_pt_vat/views/account_journal_view.xml +++ b/l10n_pt_vat/views/account_journal_view.xml @@ -8,7 +8,7 @@ diff --git a/l10n_pt_vat/views/account_move_view.xml b/l10n_pt_vat/views/account_move_view.xml index 96f94db1..f8901899 100644 --- a/l10n_pt_vat/views/account_move_view.xml +++ b/l10n_pt_vat/views/account_move_view.xml @@ -11,13 +11,12 @@ diff --git a/l10n_pt_vat/views/vat_adjustment_norm_view.xml b/l10n_pt_vat/views/vat_adjustment_norm_view.xml index f750f85f..41772bef 100644 --- a/l10n_pt_vat/views/vat_adjustment_norm_view.xml +++ b/l10n_pt_vat/views/vat_adjustment_norm_view.xml @@ -14,8 +14,6 @@ account.vat.adjustment_norm.tree account.vat.adjustment_norm - child_ids - 100