You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2015/02/23 09:34:50 UTC
svn commit: r1661614 -
/ofbiz/branches/release14.12/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml
Author: ashish
Date: Mon Feb 23 08:34:50 2015
New Revision: 1661614
URL: http://svn.apache.org/r1661614
Log:
Applied bug fix from trunk r1661612.
==============================================
Applied patch from jira issue - OFBIZ-5027 - Product Facility record should be created in case of its no record when calling setLastInventoryCount service as EECA.
Thanks Amardeep for the contribution.
==============================================
Modified:
ofbiz/branches/release14.12/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml
Modified: ofbiz/branches/release14.12/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml?rev=1661614&r1=1661613&r2=1661614&view=diff
==============================================================================
--- ofbiz/branches/release14.12/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml (original)
+++ ofbiz/branches/release14.12/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml Mon Feb 23 08:34:50 2015
@@ -1274,6 +1274,16 @@ under the License.
<entity-one value-field="inventoryItem" entity-name="InventoryItem" auto-field-map="false">
<field-map field-name="inventoryItemId" from-field="parameters.inventoryItemId"/>
</entity-one>
+ <if-not-empty field="inventoryItem">
+ <set field="facilityId" from-field="inventoryItem.facilityId"/>
+ <set field="productId" from-field="inventoryItem.productId"/>
+ <entity-one value-field="productFacility" entity-name="ProductFacility"/>
+ <if-empty field="productFacility">
+ <set field="createProductFacilityMap.facilityId" from-field="facilityId"/>
+ <set field="createProductFacilityMap.productId" from-field="productId"/>
+ <call-service service-name="createProductFacility" in-map-name="createProductFacilityMap" require-new-transaction="true"/>
+ </if-empty>
+ </if-not-empty>
<entity-and list="productFacilities" entity-name="ProductFacility">
<field-map field-name="productId" from-field="inventoryItem.productId" />
</entity-and>