-
- Downloads
[FIX] expression: avoid useless query when searching on x2many sub-field
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!
Loading
Please register or sign in to comment