Daily updates from Odoo
Friday, March 8, 2024
3 changes · 17.0
Enhancements to existing features
This update significantly improves the speed of tax mapping calculations in the accounting system. The change optimizes how taxes are processed during financial operations, making the system 6 times faster for these calculations. This is especially important during system upgrades and when processing large volumes of financial data, reducing processing time from hours to minutes.
Original PR description
Context: upgrade script calling `recompute_fields(cr, "sale.subscription.line", ["price_subtotal"])`. It was noticed that this update step runs a long time and is not limited by the DB, but…
Context: upgrade script calling `recompute_fields(cr, "sale.subscription.line", ["price_subtotal"])`. It was noticed that this update step runs a long time and is not limited by the DB, but CPU-limited in python. Profiling the code showed that 94% of the execution time is spent in the `filtered()` call in `map_tax()` of model `account.fiscal.position` during this upgrade. The profile also shows that this whole code path effectively creates deeply nested loops, leading to 3.6 **billion** calls to the `lambda` passed to `filtered()` with only ~4k rows on model `sale.subscription.line` (upg-1218044). The idea of this improvement is to - by the grace of `read_group()` - build a dict of ids that maps tax_src_id to dest_ids outside of the loop over `taxes` and then build the result only through lookups from that dict, reducing the loop nesting by two levels. Using cProfile again, it shows that the average runtime of `map_tax()` is ~6x faster with the patch (16.7ms vs. 2.8ms). For above cited upgrade, the process is no longer CPU limited and the runtime of this step is reduced from ~8h to ~2.5h, which is significant enough to be relevant for upgrades. Considering this code is unchanged on branches up to `master`, this should also reduce response times in normal operation, when recomputations involving multiple calls to `map_tax()` are triggered by user action. Forward-Port-Of: odoo/odoo#151455
This update enhances the HR Attendance module to use high-accuracy geolocation when employees check in or out. By enabling more precise location tracking, the system can better verify that employees are at the correct location during attendance registration, improving the reliability of attendance records.
Original PR description
task-3764355
Luxembourg's temporary 1% VAT rate reduction from 2023 has ended, so the system is being updated to deactivate those temporary tax rates for 2024. The old tax rates are being kept in the system rather than deleted, allowing customers to continue using them if needed for historical records or specific situations.
Original PR description
In Luxembourg, during the year 2023, the VAT rates were decreased by 1% temporarily. Now that we are in 2024, we need to deactivate the taxes added previously. We will not remove them so that client can still use them if needed. Task: 3635758 X-original-commit: eee565f --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#156928