You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When different RFQ are generated by mrp_multi_level in a single run they get merged together. This is different from RFQ created by stock rules.
To Reproduce
Seen in 15.0, probably exist in other versions
Steps to reproduce the behavior:
Using the demo data of mrp_multi_level
create a sale order for 3 FP-3 delivery date in 1 month, confirm it
create a sale order for 5 FP-3 delivery date in 2 months, confirm it
run MRP Multilevel for WH/Stock and check PP-3 -> you will get 2 lines, one for the 1st SO with a qty of 12=43, and one for the 2nd SO with a qty of 20=45
select the two lines related to PP-3 and run "procure"
Expected behavior
I expect 2 RFQ to be generated with a date about 1 month apart, one with a qty of 12 and the other one with a qty of 20. Both should have a delivery date allowing the manufacturing of the FP-3, as indicated in the procurement wizard:
Observed behavior
I see only 1 RFQ, with a planned date which will be too late for the 1st sale order delivery date to be met.
There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.
mrp_multi_level merges purchase orders
When different RFQ are generated by mrp_multi_level in a single run they get merged together. This is different from RFQ created by stock rules.
To Reproduce
Seen in 15.0, probably exist in other versions
Steps to reproduce the behavior:
Using the demo data of mrp_multi_level
Expected behavior
I expect 2 RFQ to be generated with a date about 1 month apart, one with a qty of 12 and the other one with a qty of 20. Both should have a delivery date allowing the manufacturing of the FP-3, as indicated in the procurement wizard:

Observed behavior
I see only 1 RFQ, with a planned date which will be too late for the 1st sale order delivery date to be met.

Additional context
The source code in purchase_stock which is in charge of merging RFQ or not merging them is only called when the RFQ is created by a stock rule, and therefore not triggered by mrp_multi_level (see https://github.com/odoo/odoo/blob/70f840999b67515bc7d7220321c8e39bec2adefc/addons/purchase_stock/models/stock_rule.py#L322) -> possible solutions could be to inject an orderpoint_id in the context or to override the _make_po_get_domain method in the module.
If I run the procurement for the FP-3 then the manufacturing orders are correctly computed with the correct dates.
The text was updated successfully, but these errors were encountered: