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

While creating inventory item of type "SERIALIZED_INV_ITEM" in "INV_ON_HOLD" status it gets created in "INV_AVAILABLE" status

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Release Branch 13.07, Release Branch 14.12, Release Branch 15.12, Trunk
    • Fix Version/s: 14.12.01, 15.12.01, 13.07.04
    • Component/s: product
    • Labels:
      None

      Description

      Use Case: When we create a serialized inventory item and the serial number is not provided, it should be created in "INV_ON_HOLD" status to exclude this item from being count in ATP.

      As per the current implementation in service receiveInventoryProduct if status provided is "INV_ON_HOLD" for inventory item of type "SERIALIZED_INV_ITEM" it should not update to "INV_AVAILABLE" but it's not working expectedly. Here is the logic to check for the same:

                  <if>
                      <condition>
                          <and>
                              <if-compare value="SERIALIZED_INV_ITEM" operator="equals" field="parameters.inventoryItemTypeId"/>
                              <if-empty field="parameters.returnId"/>
                          </and>
                      </condition>
                      <then>
                          <!-- Retrieve the new inventoryItem -->
                          <entity-one entity-name="InventoryItem" value-field="inventoryItem">
                              <field-map field-name="inventoryItemId" from-field="currentInventoryItemId"/>
                          </entity-one>
      
                          <!-- Don't reset the status if it's already set to INV_PROMISED or INV_ON_HOLD -->
                          <if>
                              <condition>
                                  <and>
                                      <if-compare value="INV_PROMISED" operator="not-equals" field="inventoryItem.statusId"/>
                                      <if-compare value="INV_ON_HOLD" operator="not-equals" field="inventoryItem.statusId"/>
                                  </and>
                              </condition>
                              <then>
                                  <clear-field field="serviceInMap"/>
                                  <set field="serviceInMap.inventoryItemId" from-field="currentInventoryItemId"/>
                                  <set field="serviceInMap.statusId" value="INV_AVAILABLE"/> <!-- XXX set to returned instead -->
                                  <call-service service-name="updateInventoryItem" in-map-name="serviceInMap"/>
                              </then>
                          </if>
                      </then>
                  </if>
      

        Attachments

          Activity

            People

            • Assignee:
              pandeypranay Pranay Pandey
              Reporter:
              aditi17 Aditi Patidar

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment