Skip to content

Cancel order increases stock although "Set Items' Status to be In Stock When Order is Cancelled" is set to No #20121

Closed
@denzyk

Description

@denzyk

We've recently run into issue where stock quantity is restored (increased back by 1) after the order has been canceled although Set Items' Status to be In Stock When Order is Cancelled is set to No.

Preconditions

  1. Magento 2.2.6 Community
  2. Reproduced on PHP 7.1.18 and 7.1.25
  3. MariaDB 10.1.26 and 10.3.11
  4. Go to Stores -> Configuration -> Catalog -> Inventory and make sure the following options are set as per below:
  • Decrease Stock When Order is Placed to Yes
  • Set Items' Status to be In Stock When Order is Cancelled to No
  • Manage Stock to Yes
  • Automatically Return Credit Memo Item to Stock to No
    (see screenshot below)
    image

Steps to reproduce

  1. Place an order with 1 item of product (i.e. qty = 1)
  2. Cancel order

Expected result

  1. Product quantity in product catalog is decreased by 1 after order is created
  2. Product quantity remains the same (i.e. does not increase) after order is canceled

Actual result

  1. Product quantity in product catalog is decreased by 1 after order is created
  2. Product quantity is increased by 1 immediately after order is canceled

Metadata

Metadata

Assignees

Labels

Component: CatalogFixed in 2.2.xThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions