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

Product inventory reservation places orders if quantityNotReserved !=0 and requireInventory=Y

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Trunk, 17.12.08, 18.12.01, 18.12.02, 18.12.03, Upcoming Branch
    • 18.12.06, 22.01.01
    • ecommerce, order
    • None
    • Linux/Ubuntu 20.04 LTS, Java 8

    Description

      The service reserveProductInventoryByFacility (file InventoryReserveServices.xml) simply do nothing in case quantityNotReserved value is not 0, but (ProductStore) requireInventory = Y.

      Now, no action is taken and quantityNotReserved is simply returned to the caller (ie: reserveStoreInventory).

      In this scenario an order can be placed despite there is no available inventory to fulfill an order item, causing backorder (that we wanted to avoid setting requireInventory flag on the ProductStore to Y ).

       

      <if-compare field="parameters.quantityNotReserved" operator="not-equals" value="0" type="BigDecimal">
        <if-compare field="parameters.requireInventory" operator="equals" value="Y">
          <!-- use this else pattern to accomplish the anything but Y logic, ie if not specified default to inventory NOT required -->
        <else> 

      I checked the usage of the service around the project and it seems to me that we can make an important assertion:  we can consider that also  requireInventory flag of the ProductStore is Y.

       

      This issue is strictly related to OFBIZ-12264 issue.

      Attachments

        Issue Links

          Activity

            People

              Giulio_MpStyle Giulio Speri
              Giulio_MpStyle Giulio Speri
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: