From 02bac97be9d79cd0b55d98bf6c6534fae1370809 Mon Sep 17 00:00:00 2001 From: Arnaud Pineux Date: Thu, 8 Nov 2012 09:25:40 +0100 Subject: [PATCH] [FIX] Analytic lp bug: https://launchpad.net/bugs/1075436 fixed bzr revid: api@openerp.com-20121108082540-026nmjhrhyiuw710 --- addons/analytic/analytic.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py index d452b48155a..31732708322 100644 --- a/addons/analytic/analytic.py +++ b/addons/analytic/analytic.py @@ -98,13 +98,11 @@ class account_analytic_account(osv.osv): def name_get(self, cr, uid, ids, context=None): res = [] - 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))) + full_ids = [] + full_ids.append(ids) + for id in full_ids: + elmt = self.browse(cr, uid, id, context=context) + res.append((id, self._get_one_full_name(elmt))) return res def _get_full_name(self, cr, uid, ids, name=None, args=None, context=None):