Vijay Ganesh created OFBIZ-10831:
------------------------------------
Summary: Re-reservation of Inventory Items when Ship Group
Destination Address or Shipment Method is updated in Sales Order
Key: OFBIZ-10831
URL: https://issues.apache.org/jira/browse/OFBIZ-10831
Project: OFBiz
Issue Type: Bug
Components: order
Affects Versions: Release Branch 16.11
Reporter: Vijay Ganesh
Fix For: Release Branch 16.11
Hi,
We came across this issue recently and also have fixed the same.
After creating a sales order and approving it, we created a shipment and
receive all the items and change the status to Packed.
Moving to the sales order edit screen. We are able to update the Ship Group
Destination Address or Shipment Method. Even without changing anything if we
simply click the update button, Inventory re-reservation service is being
called and getting re-reserved. Since there are no records in the
[OrderItemShipGrpInvRes|https://localhost:8443/webtools/control/FindGeneric?entityName=OrderItemShipGrpInvRes]
Entity, the inventory values are getting re-reserved again and this is a major
issue.
For a Sales Order of quantity 10, after approving and creating a shipment, we
issue 10 items and change status to packed. Now we go to the Order View/Edit
Screen and update the shipment method/Address or simply click the update button
and the quantity in the Shipment for that order changes to 20 which should not
happen.
The fix we made is passing a hidden variable from the shipping Info Section and
when clicking the update button, we pass that value to the Inventory
Re-reservation event and check the value in that method.
In the loadCartForUpdate method in OrderService.java, we pass the checkValue to
see whether this request is coming from the Shipping Information update section
and prevent the cancelOrderInventoryReservation service from calling.
In the saveUpdatedCartToOrder method in OrderService.java using the same
checkValue, we prevent the reserveInventory service from calling.
This occurs when an existing shipment is in packed status for an order and that
order's shipping information needs to be edited.
This was an issue in our case and we fixed this way.
If it is ok we will provide the patch here?.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)