Daily updates from Odoo
Wednesday, June 19, 2024
1 change
Enhancements to existing features
The GST return report generation has been significantly optimized to handle large volumes of transaction data much faster. By improving how the system retrieves and processes accounting and point-of-sale records, the report now completes in approximately 10% of the previous time—reducing processing time from 2800 seconds to 300 seconds for typical datasets. This improvement directly benefits users who need to generate GST compliance reports without experiencing long system delays.
Original PR description
Issue --> With a large number of `account.move.line` and `pos.order.line` records, methods `_get_tax_details`, `_get_gstr1_hsn_json` and `_set_details_pos_lines` do not perform well. Solution --> In…
Issue --> With a large number of `account.move.line` and `pos.order.line` records, methods `_get_tax_details`, `_get_gstr1_hsn_json` and `_set_details_pos_lines` do not perform well. Solution --> In `_get_tax_details` --> Replace the journal items recordset with a set of ids to do deletions. Move the fetch to when it is actually needed. In `_get_gstr_hsn_json` --> Prefetch the l10n_in_code values on `uom.uom` records that are used in the for loop. This optimization prevents additional hits to the backend. In `_set_details_pos_lines` --> Fetch `product.product` records and all the `uom.uom` records before the for loop to prevent additional hits to the backend when trying to fetch `product_id.type`, `product_id.l10n_in_hsn_code` and `product_uom_id.l10n_in_code` Benchmark --> For about 110k journal items and 95k pos order lines, the current implementation takes about 2800 seconds to finish computation. After the fix, the process takes about 300 seconds to finish. opw-3895401