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

[13.0] [REGRESSION] Orderpoints broken with multi-step reception & multi-warehouse #75481

Open
jbaudoux opened this issue Aug 23, 2021 · 3 comments
Labels
13.0 Logistics about stock, mrp, delivery, purchase

Comments

@jbaudoux
Copy link
Contributor

jbaudoux commented Aug 23, 2021

This recent commit 006ab22 in odoo regarding this issue #75236 is causing some regressions

Setup:

  • 2 warehouses configured in 2 step reception: WH & WH2
  • Product A with no stock, the default buy route and a supplier
  • An orderpoint in each warehouse
    • orderpoint on WH (max 30)
    • orderpoint on WH2 (max 20)

Case 1
Run the scheduler.
Expected result: A PO of 30 for the WH and a PO of 20 for WH2.
Wrong result: A PO of 30 for the WH and no PO of 20 for WH2.

Case 2
Resupply WH2 from WH by configuring it on the warehouse and enabling the route on the product. Configure the product or rule as MTO (so the resupply will purchase and not take from WH stock)
Run the scheduler.
Expected result: A PO line of 30 for the WH, a move of 20 from WH to WH2, and a PO line of 20 for WH.
Wrong result: A PO of 30 for the WH, a move of 20 from WH to WH2 and no PO of 20 for WH2.

@agr-odoo @amoyaux

@agr-odoo
Copy link
Contributor

Hello,
apologizes for the inconvenience, I'm working on a tentative solution here

@mathieu-mgm
Copy link

@jbaudoux Hello, for case 2, may I ask why you have set up two different routes to resupply the same warehouse for the same product ? In my opinion the expected result for case 2 should be : A PO line for 50 qty, and a move of 20 from WH to WH2

@jbaudoux
Copy link
Contributor Author

jbaudoux commented Aug 24, 2021

@mathieu-mgm The second case is related to this test case that is currently failing since the change: https://github.com/OCA/purchase-workflow/blob/13.0/purchase_line_procurement_group/tests/test_po_line_proc_group.py

I think you are right that it should create one PO line of 50. Since the change, it is only creating a PO line of 30 and nothing for the MTO need of 20.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
13.0 Logistics about stock, mrp, delivery, purchase
Projects
None yet
Development

No branches or pull requests

4 participants