Skip to content

Commit

Permalink
[MIG] l10n_pt_vat: migrate to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dreispt committed Sep 19, 2024
1 parent aea573c commit 682c9c6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions l10n_pt_vat/models/l10n_pt_vat_exempt_reason.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<def name_get>>
result format: {[(id, name), (id, name), ...]}
"""
args = args or []
Expand Down

0 comments on commit 682c9c6

Please sign in to comment.