-
- Downloads
[FIX] mrp, stock: select correct preferred route
Steps to reproduce: - Create two extra warehouses (B and C): * Warehouse B: Resupply from San Francisco * Warehouse C: Resupply from San Francisco - Create a new Product: * Storable * Inventory > Routes: select only Warehouse B and Warehouse C - Create a new Move: * From WHC to a Customer * Confirm the order Issue: In replenishment, the defined prefered route will be Warehouse B Cause: When the replenishment view is loaded, in https://github.com/odoo/odoo/blob/5757502a79c920e1aa4c7ca1c581c533907ce674/addons/stock/models/stock_orderpoint.py#L427 The preferred route (route_id) is defined as the first element of the routes defined for the produc which is wrong. Solution: Filter the route_ids by selecting the route for which the supplied warehouse is equal to the warehouse selected for the orderpoint. Note: The test in "test_bom" has been modified because it was using the wrong flow (a route should have been set by default) opw-2815462 closes odoo/odoo#89739 X-original-commit: b5bd03f9 Signed-off-by:Adrien Widart <awt@odoo.com> Signed-off-by:
yosa-odoo <yosa@odoo.com>
Loading
Please register or sign in to comment