Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-10831

Re-reservation of Inventory Items when Ship Group Destination Address or Shipment Method is updated in Sales Order



    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: Release Branch 16.11, Release Branch 18.12, Release Branch 17.12, Trunk
    • Fix Version/s: None
    • Component/s: order
    • Labels:
    • Flags:



      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 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?.


        1. image-2019-04-27-12-32-44-743.png
          26 kB
          Vijay Ganesh
        2. image-2019-04-27-12-34-57-818.png
          24 kB
          Vijay Ganesh
        3. image-2019-04-27-12-46-52-368.png
          17 kB
          Vijay Ganesh



            • Assignee:
              aditi17 Aditi Patidar
              vijayganeshb Vijay Ganesh
            • Votes:
              0 Vote for this issue
              4 Start watching this issue


              • Created: