diff --git a/openerp/osv/fields.py b/openerp/osv/fields.py index da09fe0e27e..9921e3f762d 100644 --- a/openerp/osv/fields.py +++ b/openerp/osv/fields.py @@ -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)