Decrease Stock When Order is Placed not working

Hi

I tested my M2 (2.3.0) system, but the decrease stock function is not working. This function is enabled on admin panel.

  • create order
  • create invoice
  • tried finish the ship in order but i had an error: Source item not found by source code: default and sku
  • i disabled Product stock option >> manage stock
  • ship in order now fine

The decrease stock function is not working, but is activated on admin panel.

I don’t know how working the stock management:

  • Product #1 quantity 1 salable empty >> on front end: in stock, and 0 avaliable (is it problem with salable? how turn off?)
  • Product #2 quantity 0 salable empty >> on front end: in stock, and 0 avaliable

Salable quantity value is important for good works? It’s a migrated database btw with 5000 products. We cannot fill the value to be filled… is there an automated solution?

We had the same problem when we upgraded the modules, all products indicated that they were out of stock. That’s why we’ve reverted to older modules.

When I created a new product, salable quantity is: No manage stock

===========================
- Ok, If Manage Stock option enabled, I cant finish the orders at old migrated product beaceuse the salable quantity is empty.
- If Manage Stock disabled, I can finish the process, but the quantity management not working.

How can I add a default value from copy of quantity to salable quantity on all of migrated products?

I’ve not had an opportunity to really dig into the new changes in 2.3.0 - Such as the addition of the “Salable Quantity” Column on the Products page (backend). Apparently:

  • When an Order is Placed, the Quantity field is reduced to reflect this
  • When an Order is Shipped, the new Salable Quantity field is then also reduced

salable
I haven’t put much thought into this new change, but I guess it makes sense… I had a quick look and I don’t see any way to disable this new change, so I guess it’s hard-coded in and we’ll all have to accept the changes.

Anyway, I was unable to reproduce your issue. In my 2.3.2 Sandbox I have everything under Stores > Configuration > Catalog > Inventory set as “Use system value” with the exception of Display Out of Stock Products which is set to “Yes”.

If I were to hazard a guess, I would say that the Data Migration Process that you used probably wasn’t compatible with Magento 2.3.x. Therefore, it Migrated all of the M1 data but didn’t set the Salable Quantity value because that field didn’t exist before.

At this point, I would:

  1. Check your Data Migration Process to see if there is an up-to-date version that accounts for this
  2. Reindex your Database (on the off chance there is an indexer that recalculates everything correctly)

Further Reading

Tanks a lot, sorry that i wasted your time with beginner questions.

I too came to this conclusion in the end. I will need to fill the salable quantity cells (if I want inventory management to work). The question is what code to write for automation that fills the cells for each product.

I’m not a big master in the database managment. If there is no immediate solution to what someone else has done, then I don’t want to waste your time. I’ll try to solve it.

It’s only a “stupid question” if you haven’t done your research before asking. In your case, your question was well formed with explanations and things you had tried :+1:

If you haven’t tried the Reindexing yet, I’d strongly recommend that. I noticed there is a new Indexer that wasn’t in older version called “Inventory”. I think that is tied into the new system.

Thanks. As I was writing the question, constantly changing it, I always found something :smile:

I ran Reindex, but even after reading, surely someone else had a problem with it.

Your work and this forum is very useful, I think this community is quite small and I’m a very beginner. Without them, it would be harder to prosper in the Magento world.

Tanks a lot again.

1 Like