From 682c9c64e8af34bd73d1a955e10c65be60ad4a83 Mon Sep 17 00:00:00 2001 From: Daniel Reis Date: Thu, 19 Sep 2024 17:34:10 +0100 Subject: [PATCH] [MIG] l10n_pt_vat: migrate to 17.0 --- l10n_pt_vat/models/l10n_pt_vat_exempt_reason.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 []