[FIX] expression: fix missing results in direct search on many2many fields
This case corresponds to searches like `[(field, 'ilike', name)]` where `field` is a many2many field. The domain processing performs a `name_search` on the field's comodel, then makes the relation match the returned record ids. Problem: the call to `name_search` uses the default limit (100), and this makes the search return less results than expected. Make the search complete by forcing `limit=None`.
This commit is contained in:
parent
e1a17b433d
commit
c7baab6789
|
@ -956,7 +956,7 @@ class expression(object):
|
|||
call_null_m2m = True
|
||||
if right is not False:
|
||||
if isinstance(right, basestring):
|
||||
res_ids = [x[0] for x in relational_model.name_search(cr, uid, right, [], operator, context=context)]
|
||||
res_ids = [x[0] for x in relational_model.name_search(cr, uid, right, [], operator, context=context, limit=None)]
|
||||
if res_ids:
|
||||
operator = 'in'
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue