6595cfdf0c
Searching on a domain like `[('m2m.sub', operator, value)]` currently does something like: right_ids = comodel.search([('sub', operator, value)]).ids table_ids = model.search([('m2m', 'in', right_ids)]).ids and reduces the domain triple to `('id', 'in', table_ids)`. The domain triple can actually be reduced to `('m2m', 'in', right_ids)`. With this reduction, the search on the field `m2m` will be done as part of the main query. And this will also enable the optimization of the former fix! |
||
---|---|---|
.. | ||
__init__.py | ||
expression.py | ||
fields.py | ||
orm.py | ||
osv.py | ||
query.py |