[FIX] osv.fields: properly handle reading a m2o with no value set

bzr revid: odo@openerp.com-20100817132829-fy1k9hz7cukx194z
This commit is contained in:
Olivier Dony
2010-08-17 15:28:29 +02:00
parent d74468b303
commit 71e504345d
+1 -1
View File
@@ -299,7 +299,7 @@ class many2one(_column):
def get_memory(self, cr, obj, ids, name, user=None, context=None, values=None):
result = {}
for id in ids:
result[id] = obj.datas[id][name]
result[id] = obj.datas[id].get(name, False)
return result
def get(self, cr, obj, ids, name, user=None, context=None, values=None):