[FIX] use exists method instead of search method.

bzr revid: ysa@tinyerp.com-20101231090253-zh0escpwqtk80wtv
This commit is contained in:
Yogesh Sakhreliya 2010-12-31 14:32:53 +05:30
parent 38092d24bf
commit 7b37895c7f
1 changed files with 1 additions and 1 deletions

View File

@ -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, {})