[FIX] name_search() where _rec_name is a reference field and links are broken
bzr revid: cto@openerp.com-20131211103842-i1n9t8mg9kuw77v3
This commit is contained in:
@@ -204,7 +204,8 @@ class reference(_column):
|
||||
model_name, res_id = value.split(',')
|
||||
model = obj.pool.get(model_name)
|
||||
if model and res_id:
|
||||
return model.name_get(cr, uid, [int(res_id)], context=context)[0][1]
|
||||
names = model.name_get(cr, uid, [int(res_id)], context=context)
|
||||
return names[0][1] if names else False
|
||||
return tools.ustr(value)
|
||||
|
||||
# takes a string (encoded in utf8) and returns a string (encoded in utf8)
|
||||
|
||||
Reference in New Issue
Block a user