Skip to content

Commit

Permalink
Improved: Improved condition in which reversation block was not being…
Browse files Browse the repository at this point in the history
… executed in case of auto-reserve not found in attribute.

(OFBIZ-10518)
This should be a case only when system is configured for inventory allocation planning. It was found when some tests were failing and mentioning that reservations not done for items. 
Thanks: Mathieu Lirzin & Deepak Dixit.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859267 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
surajkhurana committed May 15, 2019
1 parent 9b4475e commit ff7ea6a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,7 @@ public static void reserveInventory(Delegator delegator, LocalDispatcher dispatc
continue;
}
GenericValue orderItem = itemValuesBySeqId.get(orderItemShipGroupAssoc.get("orderItemSeqId"));
if ("SALES_ORDER".equals(orderTypeId) && orderItem != null) {
if ("SALES_ORDER".equals(orderTypeId) && orderItem != null && productStore != null && "Y".equals(productStore.getString("allocateInventory"))) {
//If the 'autoReserve' flag is not set for the order item, don't reserve the inventory
String autoReserve = OrderReadHelper.getOrderItemAttribute(orderItem, "autoReserve");
if (autoReserve == null || !"true".equals(autoReserve)) {
Expand Down

0 comments on commit ff7ea6a

Please sign in to comment.