Skip to content
Snippets Groups Projects
Commit 9ceb6b4f authored by clesgow's avatar clesgow
Browse files

[FIX] mrp: avoid mixing up route_info

Take the following BoM :
Final_product
    Semi_final_1 (Subcontracted)
        Component_1 (Dropshipped to subcontractor)
    Semi_final_2 (Manufactured by us)
        Component_1 (Bought then put in stock)

Component_1 is used in both semi_finals, but in different contexts. For
Semi_final_1, it's directly dropshipped to the subcontractor, while for
Semi_final_2 we resupply our stock and then use it from there.

Problem is, since both components are the same, there was no distinction
made when fetching the data for the resupply methods. So if the first
case encountered was the dropship (like here), then for Semi_final_2 the
dropship would be used as well, while we're not in a subcontracting
context anymore.

Now we consider the parent_bom when fetching and storing the resupply
data, as different boms can have different contexts.

Part of task-2985735

Part-of: odoo/odoo#104893
parent feeef868
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment