Tuesday, May 5, 2026
1 change · saas-18.1
Resolved issues and error corrections
Odoo now correctly calculates purchase replenishment quantities when products must be ordered in fixed pack sizes. This prevents under-ordering by ignoring the maximum quantity cap when a replenishment multiple requires rounding up to the next full pack.
Original PR description
Steps to reproduce the bug:
- Create a storable product “P1”:
- vendor: - name: Azure interior - uom: Pack of 6 - Qty: 1
- Recording rule:
- set the route to buy
- set the min qty to 8 units -> qty to order = 8
→ thanks to the “_compute_product_max_qty”, the qty max is set to 8:
https://github.com/odoo/odoo/commit/5e8a148fe318473a67a960f4ac58768de1874a5e#diff-799127df468a97052c2448e32d8decc03726ea9c789ce719adcb0af7dfdd776fR138-R142
- Set the “replenishment multiple” to pack 6
Problem:
The qty to order should be updated to 12 units, because we need 2 * pack 6.
https://github.com/odoo/odoo/blob/09d6c79f0e407cb2f9dfc652ba861597c9a60110/addons/stock/models/stock_orderpoint.py#L373-L374
But as the qty_max is set, the qty to order is not updated.
opw-4644101