Skip to content

Commit

Permalink
[IMP] account_payment_return_import_sepa_pain: missing return reasons (
Browse files Browse the repository at this point in the history
…OCA#228)

* Missing return reasons refs OCA#226
* Translations with new return reasons
* name_get: Display name like: "[code] Name"
  • Loading branch information
ThomasBinsfeld authored and Ricardoalso committed Nov 14, 2023
1 parent 6483e94 commit 4539ee2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions account_payment_return/models/payment_return_reason.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,8 @@ def name_search(self, name, args=None, operator='ilike', limit=100):
if not recs:
recs = self.search([('name', operator, name)] + args, limit=limit)
return recs.name_get()

@api.multi
def name_get(self):
return [(r.id, "[{code}] {name}".format(code=r.code, name=r.name))
for r in self]

0 comments on commit 4539ee2

Please sign in to comment.