https://github.com/AmpersandHQ/magento2-disable-stock-reservation
This module disables the inventory reservation logic introduced as part of MSI in Magento 2.3.3
https://github.com/AmpersandHQ/magento2-disable-stock-reservation
Last synced: 8 months ago
JSON representation
This module disables the inventory reservation logic introduced as part of MSI in Magento 2.3.3
- Host: GitHub
- URL: https://github.com/AmpersandHQ/magento2-disable-stock-reservation
- Owner: AmpersandHQ
- License: lgpl-3.0
- Created: 2019-11-04T10:25:19.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-02-19T08:16:14.000Z (over 1 year ago)
- Last Synced: 2025-03-05T07:52:27.274Z (9 months ago)
- Language: PHP
- Homepage:
- Size: 9.1 MB
- Stars: 220
- Watchers: 16
- Forks: 65
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-magento2 - Disable Stock Reservation - This module disables the inventory reservation logic introduced as part of MSI in Magento 2.3.3. (Open Source Extensions / Adminhtml / Backend)
README
# AmpersandHQ/magento2-disable-stock-reservation
[](https://app.travis-ci.com/AmpersandHQ/magento2-disable-stock-reservation)
This module disables the inventory reservation logic introduced as part of MSI in Magento 2.3.3 - see
https://github.com/magento/inventory/issues/2269 for more information about the way MSI was implemented, and the issues
that can happen with external WMS integrations.
## The Problem
During the order placement and fulfilment processes, Magento's MSI implementation will not decrement stock on order
placement - it will only do so on order shipment and refund.
## Our Approach
This module will:
* Prevent all writes to the `inventory_reservation` table. It does so by using an `around` plugin on `PlaceReservationsForSalesEventInterface`
* Trigger stock deductions on order placement. See `inventory_sales_source_deduction_processor` plugin on `Magento\Sales\Model\Service\OrderService`.
* Prevent stock deductions on order shipment. See disabled `inventory_sales_source_deduction_processor` observer on `sales_order_shipment_save_after` event.
* Replenish stock for cancelled order items. See `inventory` observer on `sales_order_item_cancel` event.
* Replenish stock when a credit memo is issued. See `src/Observer/RestoreSourceItemQuantityOnRefundObserver.php`
* Requires that "Back to stock" is checked or "Automatically Return Credit Memo Item to Stock" is configured
* https://docs.magento.com/user-guide/configuration/catalog/inventory.html#product-stock-options
* Truncate (ie, remove all historic entries from) the `inventory_reservation` table upon installation.
## Additional Notes
* Both the `inventory` and `cataloginventory_stock` should be on the same mode (`Update on Save` or `Schedule`) for this module to work as expected. If you are running this on `Schedule` you should have crons activated.