Files
odoo_source/addons/account_fleet
Andrew Gavgavian 4771963f7c [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#116679

X-original-commit: c94d57edc002e499e317d04b2864d22acb5f40fa
Related: odoo/enterprise#38808
Signed-off-by: William André (wan) <wan@odoo.com>
2023-03-27 19:13:37 +02:00
..
…
…