Daily updates from Odoo
Saturday, July 12, 2025
1 change · 18.0
Enhancements to existing features
Bank reconciliation now loads potential journal items much faster for company-filtered searches. This improves responsiveness for users working with very large accounting datasets, reducing a reported query from about 50 seconds to about 3 seconds in the tested case.
Original PR description
This fix aims to avoid a subquery in the main query and instead use a
IN clause to improve search performance.
On a database with over 37 million journal items, before the fix, the
query to load the 40 potentials journal items to reconcile in the bank
reconciliation widget took around 50 seconds; after the fix, it take
only 3 seconds (with only 1 company to filter).
Subquery when 'child_of' is used:
```
...
AND (
"account_move_line"."company_id" IN (
SELECT
"res_company"."id"
FROM
"res_company"
WHERE
("res_company"."parent_path" LIKE '1/%')
)
)
```
Query after the fix:
```
...
AND ("account_move_line"."company_id" IN (1))
```
opw-4896863
Forward-Port-Of: odoo/odoo#218034