Tuesday, March 11, 2025
2 changes · 18.0
Enhancements to existing features
Opening the Replenishment view is now much faster in databases with many automatically triggered replenishment rules. The change avoids unnecessary calculations when there are no relevant manual replenishment records to clean up, reducing wait times significantly.
Original PR description
Issue --> When the Replenishment view is opened, the method `_unlink_processed_orderpoints` is called to remove previously automatically created orderpoints that have since been refilled. In this…
Issue -->
When the Replenishment view is opened, the method `_unlink_processed_orderpoints` is called to remove previously automatically created orderpoints that have since been refilled. In this method, the search domain contains `qty_to_order` which causes computations to fulfil the search query. The search_query also contains `("trigger", "=", "manual")`. Even if the recordset for this leaf is 0, the `qty_to_order` computations still occur, only to return 0 records in the search.
Solution -->
Move the `qty_to_order <= 0` check after the search produces a recordset for `("trigger", "=", "manual")`. This avoids unnecessary computations.
Benchmarks -->
For this benchmark, we'll assume the worst case, where every orderpoint on the database has trigger set to `auto`. The number of seconds represents the time taken to open the Replenishment view.
| # of auto trigger orderpoints | Before | After |
|--------|--------|--------|
| 12.2k | 155.58 s | 4.49 s |
| 6k | 59.87 s | 3.78 s |
opw-4606704HR teams can now import time off allocations that use accrual plans more reliably. When an accrual plan is provided, the allocation type is set automatically, and allocation duration values are compatible with export and import workflows.
Original PR description
Problem ---------- It is impossible to import batch of data with allocation_type set to 'accrual' and an allocation duration Objective ---------- - DO NOT make it possible by removing the readonly attribute on the allocation_type field - Allow the user to set directly an accrual plan and the allocation_type will be set automatically accordingly - Same fot the allocation duration make it importable Solution ---------- - Accrual plan : create an inverse, if accrual plan exists set allocation type to accrual else regular - Allocation duration, make an inverse to make it compatible export/import. It will parse the float value from the string. task-4521658