From 37bc8aa9e45a9aeaabc306f79ff1e9ca1e77a872 Mon Sep 17 00:00:00 2001 From: Dmitrijs Ledkovs Date: Mon, 31 Oct 2011 11:56:49 +0000 Subject: [PATCH] [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. --- account_banking/account_banking.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/account_banking/account_banking.py b/account_banking/account_banking.py index a23fb7b12..0d5c61a83 100644 --- a/account_banking/account_banking.py +++ b/account_banking/account_banking.py @@ -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']))