Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mrp_multi_level: merged purchase orders #1011

Closed
gurneyalex opened this issue Apr 3, 2023 · 1 comment
Closed

mrp_multi_level: merged purchase orders #1011

gurneyalex opened this issue Apr 3, 2023 · 1 comment
Labels
bug stale PR/Issue without recent activity, it'll be soon closed automatically.

Comments

@gurneyalex
Copy link
Member

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

  1. create a sale order for 3 FP-3 delivery date in 1 month, confirm it
  2. create a sale order for 5 FP-3 delivery date in 2 months, confirm it
  3. 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
  4. select the two lines related to PP-3 and run "procure"
    image

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:
image

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.
image

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.

@gurneyalex gurneyalex added the bug label Apr 3, 2023
@github-actions
Copy link

github-actions bot commented Oct 1, 2023

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.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Oct 1, 2023
@github-actions github-actions bot closed this as completed Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

No branches or pull requests

1 participant