[FIX] analytic: solve typeerror on clicking button 'Costs and Revenue'

bzr revid: cha@tinyerp.com-20121108072938-xhyqmykvik6tgucc
This commit is contained in:
Ajay Chauhan (OpenERP) 2012-11-08 12:59:38 +05:30
parent 1a8ef8657b
commit fb20b769e4
1 changed files with 4 additions and 0 deletions

View File

@ -98,6 +98,10 @@ class account_analytic_account(osv.osv):
def name_get(self, cr, uid, ids, context=None):
res = []
if not ids:
return []
if isinstance(ids, (int, long)):
ids = [ids]
for id in ids:
elmt = self.browse(cr, uid, id, context=context)
res.append((id, self._get_one_full_name(elmt)))