[FIX] osv/fields.py: fix the fix at rev 43756a24.
authorRaphael Collet <rco@openerp.com>
Fri, 22 Aug 2014 09:14:08 +0000 (11:14 +0200)
committerRaphael Collet <rco@openerp.com>
Fri, 22 Aug 2014 09:14:08 +0000 (11:14 +0200)
openerp/osv/fields.py

index 1adbf43..61c1849 100644 (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: