Author: surajk
Date: Wed May 15 06:15:52 2019
New Revision: 1859267
URL: http://svn.apache.org/viewvc?rev=1859267&view=rev
Log:
Improved: Improved condition in which reversation block was not being 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.
Modified:
ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java
Modified:
ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java?rev=1859267&r1=1859266&r2=1859267&view=diff
==============================================================================
---
ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java
(original)
+++
ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/order/OrderServices.java
Wed May 15 06:15:52 2019
@@ -1204,7 +1204,7 @@ public class OrderServices {
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)) {