[FIX] osv/fields.py: fix the fix at rev 43756a24.

This commit is contained in:
Raphael Collet 2014-08-22 11:14:08 +02:00
parent 43756a24ca
commit 20b302cc8c
1 changed files with 3 additions and 2 deletions

View File

@ -1567,8 +1567,9 @@ class property(function):
values = ir_property.get_multi(cr, uid, prop_name, obj._name, ids, context=context)
if column._type == 'many2one':
# name_get the non-null values as SUPERUSER_ID
vals = set(filter(None, values.itervalues()))
vals_name = dict(sum(vals).sudo().name_get()) if vals else {}
vals = sum(set(filter(None, values.itervalues())),
obj.pool[column._obj].browse(cr, uid, [], context=context))
vals_name = dict(vals.sudo().name_get()) if vals else {}
for id, value in values.iteritems():
ng = False
if value and value.id in vals_name: