[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
233c7780e6
commit
ba5f5614f3
|
@ -1000,7 +1000,7 @@ class expression(object):
|
|||
call_null_m2m = True
|
||||
if right is not False:
|
||||
if isinstance(right, basestring):
|
||||
res_ids = [x[0] for x in comodel.name_search(cr, uid, right, [], operator, context=context)]
|
||||
res_ids = [x[0] for x in comodel.name_search(cr, uid, right, [], operator, context=context, limit=None)]
|
||||
if res_ids:
|
||||
operator = 'in'
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue