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

Product does not return in stock, after order cancel event occours #80

Closed
gianstraf opened this issue Sep 30, 2022 · 0 comments · Fixed by #81 or #85
Closed

Product does not return in stock, after order cancel event occours #80

gianstraf opened this issue Sep 30, 2022 · 0 comments · Fixed by #81 or #85

Comments

@gianstraf
Copy link
Contributor

Hello,
we have found a problem with version 1.14 on Magento 2.4.4.
In this situation:

Product XXX
Qty Stock: 5
Min Qty: 4
Stock Status: In stock

Place order with Product XXX and Quantity 1 (pending order)
Qty Stock: 5 became 4 (ok!)
Min Qty: 4
Stock Status: Out of stock (ok!)

The order is canceled
Qty Stock: 4 became 5 (ok!)
Min Qty: 4
Stock Status: stay Out of stock ( KO !)

In the last step, we expect that Product return back in stock.
The problem came from https://github.com/magento/inventory/blob/1.2.3/InventorySourceDeductionApi/Model/SourceDeductionService.php

Included from Magento 2.4.3 on.

@gianstraf gianstraf changed the title Product does not return in stock, after order cancel event Product does not return in stock, after order cancel event occours Sep 30, 2022
gianstraf added a commit to gianstraf/magento2-disable-stock-reservation that referenced this issue Sep 30, 2022
Fix M2.4.3 introduced bug when a product should back in stock caused by order canceled event.
With the preference we restore 1.2.1 (included into M2.4.2) method SourceDeductionService::getSourceStockStatus

- Fix AmpersandHQ#8
Add a custom observer, to return stock on order credit memo creation, when flag "Back in stock" is ON, in credit memo creation.
@convenient convenient linked a pull request Oct 10, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant