[FIX] sale_mrp: Link to MO on SO
commit 96b56ea3 fix the link between SO <-> MO in manufacture 3 steps but break it on other configuration It happens because without `store after manufacturing` the procurement group is not copied and used on the MO. And the stat button search on procurement group with a MO and a SO on it. Before it was searching on `stock_move.created_production_id` and thus was able to find the MO. This commit do a mix of the 2 solutions. It search for procurement group linked to SO and MO + created_production_id to be sure to find all the MO related to a SO opw-2645042 closes odoo/odoo#79015 Signed-off-by:William Henrotin (whe) <whe@odoo.com>
Showing
- addons/sale_mrp/models/sale.py 10 additions, 5 deletionsaddons/sale_mrp/models/sale.py
- addons/sale_mrp/tests/test_multistep_manufacturing.py 5 additions, 0 deletionsaddons/sale_mrp/tests/test_multistep_manufacturing.py
- addons/sale_mrp/tests/test_sale_mrp_flow.py 3 additions, 0 deletionsaddons/sale_mrp/tests/test_sale_mrp_flow.py
- addons/sale_mrp/tests/test_sale_mrp_procurement.py 6 additions, 0 deletionsaddons/sale_mrp/tests/test_sale_mrp_procurement.py
Loading
Please register or sign in to comment