-
- Downloads
[FIX] various: change domain on aml for move_id.state queries
`Account.move.line` contains a stored related field called `parent_state` which relates to `move_id.state`. This allows for performance improvements by accessing that instead of `move_id.state`.
However, across odoo and enterprise `account.move.line` is domained against `move_id.state`.
This can produce an unnecessary left join on SQL queries for reports or other queries when instead it could use the stored field directly.
To accomplish this fix, we adjust domains to refer to 'parent_state' instead of `move_id.state`
While this PR will adjust multiple modules to fix this domain, it should improve SQL queries over large tables when a left join is no-longer necessary.
opw-3178866
closes odoo/odoo#114730
Related: odoo/enterprise#37939
Signed-off-by:
William André (wan) <wan@odoo.com>
Loading