inventory icon indicating copy to clipboard operation
inventory copied to clipboard

Extra compensation reservation (inventory_reservation) in any update of credit memo

Open tales-desde-mileto opened this issue 3 years ago • 1 comments

Preconditions (*)

  1. Magento 2.4.3-p1 with magento/module-inventory 1.2.1-p1
  2. With small data: profiles/ce/small.xml

Steps to reproduce (*)

  1. Create a full Credit Memo with not checked Return to Stock for one of products (for example: sales_creditmemo.entity_id = 1)
  2. It creates registers into inventory_reservation. For example #2 lines.
  3. Programmatically update some date of Credit Memo (CustomerNote for example). Something like this: $soyUnMemo = $objectManager->create('Magento\Sales\Model\Order\Creditmemo')->load('1'); $soyUnMemo->setCustomerNote('Hi'); $soyUnMemo->save();

Expected result (*)

  1. The count of registers on inventory_reservation should be 2

Actual result (*)

  1. The count of registers on inventory_reservation is 4
  2. And each time that we update Programmatically the credit memo, it adds two additional ones: 2->4->6->8
  3. Each time, the salable qty is changing

tales-desde-mileto avatar Feb 04 '22 22:02 tales-desde-mileto

Hi @tales-desde-mileto. Thank you for your report. To speed up processing of this issue, make sure that you provided sufficient information.

Add a comment to assign the issue: @magento I am working on this


m2-assistant[bot] avatar Feb 04 '22 22:02 m2-assistant[bot]