From 7b37895c7f7d807cbf33f3b495ccadb92286965d Mon Sep 17 00:00:00 2001 From: Yogesh Sakhreliya Date: Fri, 31 Dec 2010 14:32:53 +0530 Subject: [PATCH] [FIX] use exists method instead of search method. bzr revid: ysa@tinyerp.com-20101231090253-zh0escpwqtk80wtv --- bin/osv/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/osv/fields.py b/bin/osv/fields.py index 1d2bebbe9cb..4cd5889310f 100644 --- a/bin/osv/fields.py +++ b/bin/osv/fields.py @@ -1049,7 +1049,7 @@ class property(function): brs = properties.browse(cr, uid, nids, context=context) for prop in brs: value = properties.get_by_record(cr, uid, prop, context=context) - avil_id = obj.pool.get(value._name).search(cr, uid, [('id','=',value.id)], context=context) + avil_id = obj.pool.get(value._name).exists(cr, uid, value.id) res[prop.res_id.id][prop.fields_id.name] = (avil_id and value) and value or False if value and (prop.type == 'many2one'): replaces.setdefault(value._name, {})