-
- Downloads
[FIX] stock: fix KeyError for archived warehouses
The below line raises a KeyError when `warehouse` refers to an archived warehouse. https://github.com/odoo/odoo/blob/01cc43b0578ecc9d1fed37a12b2468ffc9d4aedd/addons/stock/models/stock_orderpoint.py#L396 The reason is that the SQL view created on https://github.com/odoo/odoo/blob/01cc43b0578ecc9d1fed37a12b2468ffc9d4aedd/addons/stock/report/report_stock_quantity.py#L28-L37 doesn't take into account whether the warehouses are archived or not. The solution proposed here is to fetch all warehouses to ensure the lookup doesn't fail. Alternatively the view could be updated but that will be a bigger change. This issue was detected during the upgrade 226754 closes odoo/odoo#88204 Signed-off-by:William Henrotin (whe) <whe@odoo.com>
Loading
Please register or sign in to comment