[OFBiz] SVN: r7814 - in trunk/applications/product: script/org/ofbiz/product/product servicedef webapp/catalog/product
jacopo@svn.ofbiz.org
jacopo at svn.ofbiz.org
Sun Jun 18 01:25:50 CDT 2006
Author: jacopo
Date: 2006-06-18 01:25:34 -0500 (Sun, 18 Jun 2006)
New Revision: 7814
Modified:
trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml
trunk/applications/product/servicedef/services.xml
trunk/applications/product/webapp/catalog/product/EditProductDupForm.ftl
Log:
Added to the "copyToProductVariants" service the ability to copy locations from virtual to variants.
Modified: trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml
===================================================================
--- trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml 2006-06-18 04:46:20 UTC (rev 7813)
+++ trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml 2006-06-18 06:25:34 UTC (rev 7814)
@@ -704,6 +704,20 @@
<create-value value-name="newTempValue"/>
</iterate>
</if-not-empty>
+ <if-not-empty field-name="parameters.duplicateLocations">
+ <if-not-empty field-name="parameters.removeBefore">
+ <find-by-and entity-name="ProductFacilityLocation" map-name="productVariantContext" list-name="foundVariantValues"/>
+ <iterate entry-name="foundVariantValue" list-name="foundVariantValues">
+ <remove-value value-name="foundVariantValue"/>
+ </iterate>
+ </if-not-empty>
+ <find-by-and entity-name="ProductFacilityLocation" map-name="productFindContext" list-name="foundValues"/>
+ <iterate list-name="foundValues" entry-name="foundValue">
+ <clone-value value-name="foundValue" new-value-name="newTempValue"/>
+ <set from-field="newProduct.productIdTo" field="newTempValue.productId"/>
+ <create-value value-name="newTempValue"/>
+ </iterate>
+ </if-not-empty>
</iterate>
</simple-method>
Modified: trunk/applications/product/servicedef/services.xml
===================================================================
--- trunk/applications/product/servicedef/services.xml 2006-06-18 04:46:20 UTC (rev 7813)
+++ trunk/applications/product/servicedef/services.xml 2006-06-18 06:25:34 UTC (rev 7814)
@@ -96,6 +96,7 @@
<attribute name="duplicateCategoryMembers" type="String" mode="IN" optional="true"/>
<attribute name="duplicateAttributes" type="String" mode="IN" optional="true"/>
<attribute name="duplicateFacilities" type="String" mode="IN" optional="true"/>
+ <attribute name="duplicateLocations" type="String" mode="IN" optional="true"/>
</service>
<service name="quickAddVariant" engine="java"
Modified: trunk/applications/product/webapp/catalog/product/EditProductDupForm.ftl
===================================================================
--- trunk/applications/product/webapp/catalog/product/EditProductDupForm.ftl 2006-06-18 04:46:20 UTC (rev 7813)
+++ trunk/applications/product/webapp/catalog/product/EditProductDupForm.ftl 2006-06-18 06:25:34 UTC (rev 7814)
@@ -71,6 +71,7 @@
${uiLabelMap.ProductCategoryMembers} <input type="checkbox" class="checkBox" name="duplicateCategoryMembers" value="Y" checked="checked"/>
${uiLabelMap.ProductAttributes} <input type="checkbox" class="checkBox" name="duplicateAttributes" value="Y" checked="checked"/>
${uiLabelMap.ProductFacilities} <input type="checkbox" class="checkBox" name="duplicateFacilities" value="Y" checked="checked"/>
+ ${uiLabelMap.ProductLocations} <input type="checkbox" class="checkBox" name="duplicateLocations" value="Y" checked="checked"/>
</div>
<input type="submit" class="smallSubmit" value="${uiLabelMap.CommonGo}"/>
</form>
More information about the Svn
mailing list