[FIX] product: avoid a traceback in the product_category#name_get method if the ids is an integer
bzr revid: stw@openerp.com-20120821090145-pp2jm318g0kyn9wi
This commit is contained in:
@@ -208,8 +208,10 @@ product_ul()
|
||||
class product_category(osv.osv):
|
||||
|
||||
def name_get(self, cr, uid, ids, context=None):
|
||||
if not len(ids):
|
||||
if isinstance(ids, (list, tuple)) and not len(ids):
|
||||
return []
|
||||
if isinstance(ids, (long, int)):
|
||||
ids = [ids]
|
||||
reads = self.read(cr, uid, ids, ['name','parent_id'], context=context)
|
||||
res = []
|
||||
for record in reads:
|
||||
|
||||
Reference in New Issue
Block a user