medusa icon indicating copy to clipboard operation
medusa copied to clipboard

@medusajs/inventory wrong allocation after completing draft order

Open andriinuts opened this issue 2 years ago • 2 comments

Bug report

Describe the bug

If after creating draft order manager will allocate items (reserve in the draft order page) and send link to the customer to make a payment, after completing order in store endpoint order successfully created but adding one more reservation, so the same item reserved twice.

System information

Medusa version (including plugins): "@medusajs/medusa": "^1.16.1", "@medusajs/inventory": "^1.9.2", "@medusajs/stock-location": "^1.9.1",

Steps to reproduce the behavior

  1. Create draft order with one selected product
  2. Allocate this item on the draft order page (reserve it)
  3. Copy link to the storefront payment and complete this order using store endpoint
  4. Open successfully created order from the draft order, you will see that this item is reserved twice

Expected behavior

Item should not be reserved twice for the same order.

andriinuts avatar Sep 25 '23 10:09 andriinuts

up

andriinuts avatar Dec 06 '23 22:12 andriinuts

Ran into this today as well, docs didn't mention anything regarding handling inventory manually.

erikengervall avatar May 08 '24 05:05 erikengervall

@andriinuts was this addressed in recent versions (haven't upgraded in a bit) or is this a duplicate?

erikengervall avatar May 14 '24 10:05 erikengervall

@andriinuts was this addressed in recent versions (haven't upgraded in a bit) or is this a duplicate?

I guess they are redoing all the modules so this ticket will not make sense

andriinuts avatar May 14 '24 10:05 andriinuts