[FIX] lp: 1039013, where an id is given to name_get instead of a list of ids

lp bug: https://launchpad.net/bugs/1039013 fixed

bzr revid: qdp-launchpad@openerp.com-20120823142656-nsqml3jnyylpgzxu
This commit is contained in:
Quentin (OpenERP) 2012-08-23 16:26:56 +02:00
parent 68c732272f
commit afa60ebc74
1 changed files with 2 additions and 0 deletions

View File

@ -582,6 +582,8 @@ class account_account(osv.osv):
def name_get(self, cr, uid, ids, context=None):
if not ids:
return []
if isinstance(ids, (int, long)):
ids = [ids]
reads = self.read(cr, uid, ids, ['name', 'code'], context=context)
res = []
for record in reads: