magento / inventory

Magento Inventory Project (a.k.a MSI)
Open Software License 3.0
337 stars 248 forks source link

Notify order is ready for pickup not working if global stock is turned off #3328

Open ganeddact opened 3 years ago

ganeddact commented 3 years ago

Preconditions (*)

  1. Magento 2.4.3
  2. MSI enabled
  3. In-store pickup configured and working
  4. Global stock control turned off (in Stores > Configuration > Catalog > Inventory > Product Stock Options > Manage Stock)

Steps to reproduce (*)

  1. Place an order containing items assigned to Sources of the Sales channel of the website
  2. Access the backend, check the order, try to "Notify order is ready for pickup"

Expected result (*)

  1. Customer is notified with an email
  2. Success of the operation is shown in the backend
  3. Order changes status to complete

Actual result (*)

  1. Customer is notified with an email
  2. Error is displayed in the backend: "The order is not ready for pickup". It's not clear that the email has been sent
  3. Order is still in processing status
  4. Potentially the user may click several times the "Notify" button, triggering the same email to be sent over and over

Looking at the code, in this class Magento/InventoryInStorePickupSales/Model/Order/IsFulfillable.php the fact that stock control could be turned off seems to not be contemplated. If stock control is turned off, items can be bought and qty in Sources won't be affected.

m2-assistant[bot] commented 3 years ago

Hi @ganeddact. Thank you for your report. To help us process this issue please make sure that you provided sufficient information.

Please, add a comment to assign the issue: @magento I am working on this