Friday, April 5, 2024
2 changes · 17.0
Enhancements to existing features
The bank reconciliation report has been restored and significantly improved after user feedback, particularly from audit teams in English-speaking countries. The report now features a consistent display with other reports, improved warning messages, and new sections to help users identify differences between accounting records and bank statements.
Original PR description
In this https://github.com/odoo/enterprise/commit/76caf5f5675f97128b88fbcffedaf1e85da516d5, it was decided to remove the report. But we received a lot of feedbacks about users missing the report, especially from anglo-saxon countries, where this report is often used in Audit processes to report on the differences between the Accounting and Bank reported amounts on bank accounts. In this pr we decided to put it back and improve it. What has been improved: - The display of the report is now consistent with the different reports - Use of custom engine - New sections added - Rework of the warnings task: 3756179
Resolved issues and error corrections
The partner ledger report was consuming excessive memory when processing large numbers of partners, causing the system to crash with memory errors. This fix optimizes how partner data is retrieved and cached, reducing peak memory usage by approximately 32% (from 1.9GB to 1.3GB) when handling 150,000+ partner records.
Original PR description
Issue --> Method `_query_partners` does a search on `res.partner` which is used in the return value. This return value is then looped over in the method `_build_partner_dicts` to create the rows on the partner ledger. If the number of returned `res.partner` records exceed a certain number, there is an overutilzation of memory when getting fields id, name and trust in method `_get_report_line_partners` leading to a MemoryError when loading the partner ledger report. Solution --> Replace the `search` call with a `search_fetch` call and store the specific field values in cache. This prevents the fetch of the field values. Flamegraph before  After  Peak memory utilization reduced from 1.9GB to 1.3GB for about 150k `res.partner` records opw-3785731