[FIX] Analytic name_get fixed

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

bzr revid: api@openerp.com-20121107161313-c4np82ftmwcy0wvb
This commit is contained in:
Arnaud Pineux
2012-11-07 17:13:13 +01:00
parent 153ab3b020
commit f5375d0eaa
+7 -3
View File
@@ -98,9 +98,13 @@ class account_analytic_account(osv.osv):
def name_get(self, cr, uid, ids, context=None):
res = []
for id in ids:
elmt = self.browse(cr, uid, id, context=context)
res.append((id, self._get_one_full_name(elmt)))
if isinstance(ids,list):
for id in ids:
elmt = self.browse(cr, uid, id, context=context)
res.append((id, self._get_one_full_name(elmt)))
else:
elmt = self.browse(cr, uid, ids, context=context)
res.append((ids, self._get_one_full_name(elmt)))
return res
def _get_full_name(self, cr, uid, ids, name=None, args=None, context=None):