[FIX] fields: execute name_get for function field of type many2one as SUPERUSER_ID (same behaviour as classical many2one)
bzr revid: mat@openerp.com-20131125125008-wmpssjk5vygdcc0w
This commit is contained in:
parent
e2102ca9ce
commit
9635119fc1
|
@ -1116,7 +1116,7 @@ class function(_column):
|
|||
# make the result a tuple if it is not already one
|
||||
if isinstance(value, (int,long)) and hasattr(obj._columns[field], 'relation'):
|
||||
obj_model = obj.pool.get(obj._columns[field].relation)
|
||||
dict_names = dict(obj_model.name_get(cr, uid, [value], context))
|
||||
dict_names = dict(obj_model.name_get(cr, SUPERUSER_ID, [value], context))
|
||||
result = (value, dict_names[value])
|
||||
|
||||
if field_type == 'binary':
|
||||
|
|
Loading…
Reference in New Issue