This is an automated email from the ASF dual-hosted git repository.
surajk pushed a commit to branch trunk
in repository
https://gitbox.apache.org/repos/asf/ofbiz-framework.gitThe following commit(s) were added to refs/heads/trunk by this push:
new faf0699 Improved: Updated hard coded values of location types and used all available location enums instead. (OFBIZ-6042) Thanks Pierre for reporting and Jacques Le Roux for review.
faf0699 is described below
commit faf0699e0dfcf831e24e4ffe9780b3aad8444fa7
Author: Suraj Khurana <
[hidden email]>
AuthorDate: Wed Apr 29 15:57:48 2020 +0530
Improved: Updated hard coded values of location types and used all available location enums instead.
(OFBIZ-6042)
Thanks Pierre for reporting and Jacques Le Roux for review.
---
.../product/minilang/product/inventory/InventoryServices.xml | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/applications/product/minilang/product/inventory/InventoryServices.xml b/applications/product/minilang/product/inventory/InventoryServices.xml
index ee469e8..a543886 100644
--- a/applications/product/minilang/product/inventory/InventoryServices.xml
+++ b/applications/product/minilang/product/inventory/InventoryServices.xml
@@ -1076,10 +1076,11 @@ under the License.
</if-compare>
</else>
</if-compare>
-
<set from-field="parameters.quantity" field="quantityNotTransferred"/>
-
- <set field="locationTypeEnumIds" value="${groovy: ['FLT_PICKLOC', 'FLT_BULK', null]}"/>
+ <set field="locationTypeMap.enumTypeId" value="FACLOC_TYPE"/>
+ <find-by-and entity-name="Enumeration" list="locationTypeEnums" map="locationTypeMap"/>
+ <set field="locationTypeEnumIds" value="${groovy: return org.apache.ofbiz.entity.util.EntityUtil.getFieldListFromEntityList(locationTypeEnums, 'enumId', true);}" type="List"/>
+ <set field="nothing" value="${groovy: locationTypeEnumIds.add(null)" type="List"/>
<iterate list="locationTypeEnumIds" entry="locationTypeEnumId">
<find-by-and entity-name="InventoryItemAndLocation" map="lookupFieldMap" list="inventoryItemAndLocations" use-iterator="true" order-by-list="orderByList"/>
<entity-condition entity-name="InventoryItemAndLocation" list="inventoryItemAndLocations">