Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] stock: consider mto procure method in stock forecast
Steps to reproduce: - Enable Multi-Step Routes in the settings - Go to Inventory > Configuration > Warehouse Management > Routes - Unarchive MTO - Create a storable product: - Routes: MTO, manufacture - With a bom - On hand qty: 10 - Create an SO for 15 units and validate - Go back to your product form > forecasted Report > Even thought 15 units are made to order 10 units are reported to be > taken from stock to fulfill the SO Cause of the issue: The lines appearing on the reported are computed by the `_get_report_lines` method. During this call, the quantity taken from stock is computed by comparing the demand of the out moves with the quantity currently in stock: https://github.com/odoo/odoo/blob/1fdccad664cad37a69dc960444aa0c318d1bf464/addons/stock/report/report_stock_forecasted.py#L218-L223 This is incorrect because the quantity taken from stock is null if the procure_method of the out move is make_to_stock. Note: The issue is not reproducible since 17.0 since the _get_report_lines has been refactored during the stockpocalypse. opw-4010785 closes odoo#176273 Signed-off-by: William Henrotin (whe) <whe@odoo.com>
- Loading branch information