Author: jacopoc
Date: Fri Aug 4 01:47:52 2006
New Revision: 428665
URL: http://svn.apache.org/viewvc?rev=428665&view=rev
Log:
I have fixed two issues:
1) when an inventory item is updated using the "updateInventoryItem" service,
the output parameter "oldOwnerPartyId" is mandatory.
So, if the ownerPartyId field is not set in the InventoryItem (for example,
it is not set in the OFBiz demo data) then an error is returned. I've fixed it
by retrieveng the owner from the facility.
Should we make the ownerPartyId a mandatory parameter for the createFacility
service? If you agree I'll commit a patch for this.
2) when an inventory transfer is completed, the service that balances the
inventory reservations must be called; it is now done using a seca
Modified:
incubator/ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml
incubator/ofbiz/trunk/applications/product/servicedef/secas.xml
Modified:
incubator/ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml
URL:
http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml?rev=428665&r1=428664&r2=428665&view=diff
==============================================================================
---
incubator/ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml
(original)
+++
incubator/ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml
Fri Aug 4 01:47:52 2006
@@ -151,6 +151,10 @@
<make-value entity-name="InventoryItem" value-name="lookupPKMap"/>
<set-pk-fields map-name="parameters" value-name="lookupPKMap"/>
<find-by-primary-key map-name="lookupPKMap"
value-name="lookedUpValue"/>
+ <if-empty field-name="lookedUpValue.ownerPartyId">
+ <get-related-one value-name="lookedUpValue"
relation-name="Facility" to-value-name="oldFacility"/>
+ <set field="lookedUpValue.ownerPartyId"
from-field="oldFacility.ownerPartyId"/>
+ </if-empty>
<field-to-result field-name="lookedUpValue.ownerPartyId"
result-name="oldOwnerPartyId"/>
<set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/>
<store-value value-name="lookedUpValue"/>
Modified: incubator/ofbiz/trunk/applications/product/servicedef/secas.xml
URL:
http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/servicedef/secas.xml?rev=428665&r1=428664&r2=428665&view=diff
==============================================================================
--- incubator/ofbiz/trunk/applications/product/servicedef/secas.xml (original)
+++ incubator/ofbiz/trunk/applications/product/servicedef/secas.xml Fri Aug 4
01:47:52 2006
@@ -26,6 +26,7 @@
<eca service="createInventoryTransfer" event="commit">
<condition field-name="statusId" operator="equals"
value="IXF_COMPLETE"/>
<action service="completeInventoryTransfer" mode="sync"/>
+ <action service="balanceInventoryItems" mode="sync"/>
</eca>
<eca service="updateInventoryTransfer" event="invoke">
@@ -35,6 +36,7 @@
<eca service="updateInventoryTransfer" event="commit">
<condition field-name="statusId" operator="equals"
value="IXF_COMPLETE"/>
<action service="completeInventoryTransfer" mode="sync"/>
+ <action service="balanceInventoryItems" mode="sync"/>
</eca>
<!-- inventory variance -->