mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[FIX] iban read method to accept a single item or a list
web-client sometimes passes a list of ids, or just a single id. In the latter case a single record is returned, instead of a list of records. Adjust code to cope with that situation.
This commit is contained in:
@@ -1118,6 +1118,8 @@ class res_partner_bank(osv.osv):
|
||||
Convert IBAN electronic format to IBAN display format
|
||||
'''
|
||||
records = self._founder.read(self, *args, **kwargs)
|
||||
if not isinstance(records, list):
|
||||
records = [records,]
|
||||
for record in records:
|
||||
if 'iban' in record and record['iban']:
|
||||
record['iban'] = unicode(sepa.IBAN(record['iban']))
|
||||
|
||||
Reference in New Issue
Block a user