Code Monkey home page Code Monkey logo

magento2-disable-stock-reservation's Introduction

AmpersandHQ/magento2-disable-stock-reservation

Build Status

This module disables the inventory reservation logic introduced as part of MSI in Magento 2.3.3 - see magento/inventory#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_reservations 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.

Additional Notes

  • Make sure to truncate any existing reservations after installing this module, see AmpersandHQ#41
  • 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.

magento2-disable-stock-reservation's People

Contributors

adrian-martinez-interactiv4 avatar aliyaaussie avatar convenient avatar danielimi avatar kernstmediarox avatar liamjtoohey avatar qrz-io avatar schmengler avatar tr33m4n avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.