MSI Allow sources that are not salable() but do allow sourcing for shipping
- Dominant language
- PHP
- Stars
- 357
- Forks
- 262
- PR merge metrics
- No merged PRs in 30d
Description
### Description
Currently the loop is not complete. When utilizing backorders when a customer orders from a source + backorder then the admin has to backorder the item. During this time the order cannot be shipped because there is not enough stock. This is correct.
When the item is received it is uploaded to some incoming source like "Incoming". The orders can then be shipped combining local stock with incoming (qty=3) ... (well only when https://github.com/magento/inventory/issues/3106 is also allowed)
The problem here is that between the moment of updating tje INC Incoming stock source and the shipment that the product becomes available again on the frontend and can be sold. This is no correct.
Also explained here: https://magento.stackexchange.com/questions/315718/magento2-msi-how-can-we-set-1-source-to-ship-from-but-not-to-sale-from
### Preconditions (*)
1. 2.3.5. MSI /w backorders
### Steps to reproduce (*)
1. See steps under Description
### Expected result (*)
1. Can ship from INC Incoming source, but it is not salable
### Actual result (*)
1. INC Incoming source is salable and this is incorrect (also leads to unnecessary indexing)
Advise would be to test the complete loop where orders are created using backorders. Test order with stock /w 3 sources INC, LS and LR. Backorders min Qty Set. Allow backorders enabled globally.
Test case 1: INC 0, LS 1, LR 1, BO 0, order qty 2
Test case 2: INC 0, LS 0, LR 1, BO MQ -5, order qty 2, backorder is placed, upload to incoming
Test case 3: INC 0, LS 0, LR 0, BO MQ -5, order qty 2, backorder is placed, upload to incoming
Contributor guide
Research direction
Start with the described backorder flow and read issue #3106, which is also required for the complete behavior. Reproduce the three cases using INC, LS, and LR sources, then verify that incoming stock can support shipping without becoming salable or triggering unnecessary indexing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100