You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by mr...@apache.org on 2008/02/16 14:54:00 UTC
svn commit: r628297 - in /ofbiz/trunk:
applications/product/script/org/ofbiz/product/product/
applications/product/servicedef/ applications/product/webapp/catalog/product/
applications/product/widget/catalog/ specialpurpose/ebay/widget/
specialpurpose/...
Author: mrisaliti
Date: Sat Feb 16 05:53:59 2008
New Revision: 628297
URL: http://svn.apache.org/viewvc?rev=628297&view=rev
Log:
Applied patch from JIRA Issue #1633.
Possibility to choose the product descriptions during the duplication of product.
Removed:
ofbiz/trunk/applications/product/webapp/catalog/product/EditProductDupForm.ftl
Modified:
ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml
ofbiz/trunk/applications/product/servicedef/services.xml
ofbiz/trunk/applications/product/webapp/catalog/product/ProductForms.xml
ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml
ofbiz/trunk/specialpurpose/ebay/widget/EbayScreens.xml
ofbiz/trunk/specialpurpose/googlebase/widget/GoogleBaseScreens.xml
Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml?rev=628297&r1=628296&r2=628297&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/product/ProductServices.xml Sat Feb 16 05:53:59 2008
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" ?>
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -172,7 +172,28 @@
<clone-value value-name="oldProduct" new-value-name="newProduct"/>
<!-- set the productId, and write it to the datasource -->
- <set from-field="parameters.productId" field="newProduct.productId"/>
+ <set from-field="parameters.newProductId" field="newProduct.productId"/>
+
+ <!-- if requested, set the new internalName field -->
+ <if-not-empty field-name="newInternalName" map-name="parameters">
+ <set from-field="parameters.newInternalName" field="newProduct.internalName"/>
+ </if-not-empty>
+
+ <!-- if requested, set the new productName field -->
+ <if-not-empty field-name="newProductName" map-name="parameters">
+ <set from-field="parameters.newProductName" field="newProduct.productName"/>
+ </if-not-empty>
+
+ <!-- if requested, set the new description field -->
+ <if-not-empty field-name="newDescription" map-name="parameters">
+ <set from-field="parameters.newDescription" field="newProduct.description"/>
+ </if-not-empty>
+
+ <!-- if requested, set the new longDescription field -->
+ <if-not-empty field-name="newLongDescription" map-name="parameters">
+ <set from-field="parameters.newLongDescription" field="newProduct.longDescription"/>
+ </if-not-empty>
+
<create-value value-name="newProduct"/>
<!-- set up entity filter -->
@@ -184,7 +205,7 @@
<find-by-and entity-name="ProductPrice" map-name="productFindContext" list-name="foundValues"/>
<iterate entry-name="foundValue" list-name="foundValues">
<clone-value value-name="foundValue" new-value-name="newTempValue"/>
- <set from-field="parameters.productId" field="newTempValue.productId"/>
+ <set from-field="parameters.newProductId" field="newTempValue.productId"/>
<create-value value-name="newTempValue"/>
</iterate>
</if-not-empty>
@@ -192,7 +213,7 @@
<find-by-and entity-name="GoodIdentification" map-name="productFindContext" list-name="foundValues"/>
<iterate entry-name="foundValue" list-name="foundValues">
<clone-value value-name="foundValue" new-value-name="newTempValue"/>
- <set from-field="parameters.productId" field="newTempValue.productId"/>
+ <set from-field="parameters.newProductId" field="newTempValue.productId"/>
<create-value value-name="newTempValue"/>
</iterate>
</if-not-empty>
@@ -200,7 +221,7 @@
<find-by-and entity-name="ProductContent" map-name="productFindContext" list-name="foundValues"/>
<iterate entry-name="foundValue" list-name="foundValues">
<clone-value value-name="foundValue" new-value-name="newTempValue"/>
- <set from-field="parameters.productId" field="newTempValue.productId"/>
+ <set from-field="parameters.newProductId" field="newTempValue.productId"/>
<create-value value-name="newTempValue"/>
</iterate>
</if-not-empty>
@@ -208,7 +229,7 @@
<find-by-and entity-name="ProductCategoryMember" map-name="productFindContext" list-name="foundValues"/>
<iterate entry-name="foundValue" list-name="foundValues">
<clone-value value-name="foundValue" new-value-name="newTempValue"/>
- <set from-field="parameters.productId" field="newTempValue.productId"/>
+ <set from-field="parameters.newProductId" field="newTempValue.productId"/>
<create-value value-name="newTempValue"/>
</iterate>
</if-not-empty>
@@ -216,7 +237,7 @@
<find-by-and entity-name="ProductAssoc" map-name="productFindContext" list-name="foundValues"/>
<iterate entry-name="foundValue" list-name="foundValues">
<clone-value value-name="foundValue" new-value-name="newTempValue"/>
- <set from-field="parameters.productId" field="newTempValue.productId"/>
+ <set from-field="parameters.newProductId" field="newTempValue.productId"/>
<create-value value-name="newTempValue"/>
</iterate>
@@ -226,7 +247,7 @@
</entity-and>
<iterate entry-name="foundValue" list-name="foundValues">
<clone-value value-name="foundValue" new-value-name="newTempValue"/>
- <set from-field="parameters.productId" field="newTempValue.productIdTo"/>
+ <set from-field="parameters.newProductId" field="newTempValue.productIdTo"/>
<create-value value-name="newTempValue"/>
</iterate>
</if-not-empty>
@@ -234,7 +255,7 @@
<find-by-and entity-name="ProductAttribute" map-name="productFindContext" list-name="foundValues"/>
<iterate entry-name="foundValue" list-name="foundValues">
<clone-value value-name="foundValue" new-value-name="newTempValue"/>
- <set from-field="parameters.productId" field="newTempValue.productId"/>
+ <set from-field="parameters.newProductId" field="newTempValue.productId"/>
<create-value value-name="newTempValue"/>
</iterate>
</if-not-empty>
@@ -242,7 +263,7 @@
<find-by-and entity-name="ProductFeatureAppl" map-name="productFindContext" list-name="foundValues"/>
<iterate entry-name="foundValue" list-name="foundValues">
<clone-value value-name="foundValue" new-value-name="newTempValue"/>
- <set from-field="parameters.productId" field="newTempValue.productId"/>
+ <set from-field="parameters.newProductId" field="newTempValue.productId"/>
<create-value value-name="newTempValue"/>
</iterate>
</if-not-empty>
@@ -259,7 +280,7 @@
What about the InventoryItemDetail entries?
-->
<clone-value value-name="foundValue" new-value-name="newTempValue"/>
- <set from-field="parameters.productId" field="newTempValue.productId"/>
+ <set from-field="parameters.newProductId" field="newTempValue.productId"/>
<!-- this one is slightly different because it needs a new sequenced inventoryItemId -->
<sequenced-id-to-env sequence-name="InventoryItem" env-name="newTempValue.inventoryItemId"/>
<create-value value-name="newTempValue"/>
@@ -294,7 +315,7 @@
<remove-by-and entity-name="InventoryItem" map-name="productFindContext"/>
</if-not-empty>
</simple-method>
-
+
<!-- Product Keyword Services -->
<simple-method method-name="createProductKeyword" short-description="create a ProductKeyword">
<make-value entity-name="ProductKeyword" value-name="newEntity"/>
Modified: ofbiz/trunk/applications/product/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services.xml?rev=628297&r1=628296&r2=628297&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/product/servicedef/services.xml Sat Feb 16 05:53:59 2008
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" ?>
+<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -64,8 +64,12 @@
<service name="duplicateProduct" engine="simple"
location="org/ofbiz/product/product/ProductServices.xml" invoke="duplicateProduct" auth="true">
<description>Duplicate a Product using a new productId</description>
- <attribute name="productId" type="String" mode="IN" optional="false"/>
+ <attribute name="newProductId" type="String" mode="IN" optional="false"/>
<attribute name="oldProductId" type="String" mode="IN" optional="false"/>
+ <attribute name="newInternalName" type="String" mode="IN" optional="true"/>
+ <attribute name="newProductName" type="String" mode="IN" optional="true"/>
+ <attribute name="newDescription" type="String" mode="IN" optional="true"/>
+ <attribute name="newLongDescription" type="String" mode="IN" optional="true"/>
<attribute name="duplicatePrices" type="String" mode="IN" optional="true"/>
<attribute name="duplicateIDs" type="String" mode="IN" optional="true"/>
<attribute name="duplicateContent" type="String" mode="IN" optional="true"/>
Modified: ofbiz/trunk/applications/product/webapp/catalog/product/ProductForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/product/ProductForms.xml?rev=628297&r1=628296&r2=628297&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/product/ProductForms.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/product/ProductForms.xml Sat Feb 16 05:53:59 2008
@@ -204,6 +204,56 @@
<display description="[${product.createdByUserLogin}] ${uiLabelMap.CommonOn} ${product.createdDate}" also-hidden="false"/>
</field>
</form>
+
+ <form name="EditProductDup" type="single" target="DuplicateProduct" title="" default-map-name="product"
+ header-row-style="header-row" default-table-style="basic-table">
+
+ <field name="oldProductId"><hidden value="${productId}"/></field>
+ <field name="newProductId" title="${uiLabelMap.ProductDuplicateRemoveSelectedWithNewId}" map-name="dupProduct"><text size="20" maxlength="20"/></field>
+ <field name="newInternalName" title="${uiLabelMap.ProductInternalName}"><text size="30" maxlength="255"/></field>
+ <field name="newProductName" title="${uiLabelMap.ProductProductName}"><text size="30" maxlength="60"/></field>
+ <field name="newDescription" title="${uiLabelMap.ProductProductDescription}" widget-style="textAreaBox"><textarea cols="60" rows="2"/></field>
+ <field name="newLongDescription" title="${uiLabelMap.ProductLongDescription}" widget-style="textAreaBox dojo-ResizableTextArea"><textarea cols="60" rows="7"/></field>
+ <field name="duplicateTitle" title="${uiLabelMap.CommonDuplicate}" title-style="h1" map-name="dummy">
+ <display description=""/>
+ </field>
+ <field name="duplicatePrices" position="1" title="${uiLabelMap.ProductPrices}"><check all-checked="true"/></field>
+ <field name="duplicateIDs" position="2" title="${uiLabelMap.CommonId}"><check all-checked="true"/></field>
+ <field name="duplicateContent" position="3" title="${uiLabelMap.ProductContent}"><check all-checked="true"/></field>
+ <field name="duplicateCategoryMembers" position="4" title="${uiLabelMap.ProductCategoryMembers}"><check all-checked="true"/></field>
+ <field name="duplicateAssocs" position="1" title="${uiLabelMap.ProductAssocs}"><check all-checked="true"/></field>
+ <field name="duplicateAttributes" position="2" title="${uiLabelMap.ProductAttributes}"><check all-checked="true"/></field>
+ <field name="duplicateFeatureAppls" position="3" title="${uiLabelMap.ProductFeatureAppls}"><check all-checked="true"/></field>
+ <field name="duplicateInventoryItems" position="4" title="${uiLabelMap.ProductInventoryItems}"><check all-checked="false"/></field>
+ <field name="removeTitle" title="${uiLabelMap.CommonRemove}" title-style="h1" map-name="dummy">
+ <display description=""/>
+ </field>
+ <field name="removePrices" position="1" title="${uiLabelMap.ProductPrices}"><check all-checked="false"/></field>
+ <field name="removeIDs" position="2" title="${uiLabelMap.CommonId}"><check all-checked="false"/></field>
+ <field name="removeContent" position="3" title="${uiLabelMap.ProductContent}"><check all-checked="false"/></field>
+ <field name="removeCategoryMembers" position="4" title="${uiLabelMap.ProductCategoryMembers}"><check all-checked="false"/></field>
+ <field name="removeAssocs" position="1" title="${uiLabelMap.ProductAssocs}"><check all-checked="false"/></field>
+ <field name="removeAttributes" position="2" title="${uiLabelMap.ProductAttributes}"><check all-checked="false"/></field>
+ <field name="removeFeatureAppls" position="3" title="${uiLabelMap.ProductFeatureAppls}"><check all-checked="false"/></field>
+ <field name="removeInventoryItems" position="4" title="${uiLabelMap.ProductInventoryItems}"><check all-checked="false"/></field>
+ <field name="submitButton" title="${uiLabelMap.CommonDuplicate}" widget-style="smallSubmit"><submit button-type="button"/></field>
+ </form>
+
+ <form name="UpdateProductVariants" type="single" target="UpdateProductVariants?productId=${productId}" title="" default-map-name="product"
+ header-row-style="header-row" default-table-style="basic-table">
+
+ <field name="virtualProductId"><hidden value="${productId}"/></field>
+ <field name="removeBefore" position="1" title="${uiLabelMap.ProductRemoveBefore}"><check all-checked="false"/></field>
+ <field name="duplicatePrices" position="2" title="${uiLabelMap.ProductPrices}"><check all-checked="true"/></field>
+ <field name="duplicateIDs" position="3" title="${uiLabelMap.CommonId}"><check all-checked="true"/></field>
+ <field name="duplicateContent" position="4" title="${uiLabelMap.ProductContent}"><check all-checked="true"/></field>
+ <field name="duplicateCategoryMembers" position="1" title="${uiLabelMap.ProductCategoryMembers}"><check all-checked="true"/></field>
+ <field name="duplicateAttributes" position="2" title="${uiLabelMap.ProductAttributes}"><check all-checked="true"/></field>
+ <field name="duplicateFacilities" position="3" title="${uiLabelMap.ProductFacilities}"><check all-checked="true"/></field>
+ <field name="duplicateLocations" position="4" title="${uiLabelMap.ProductLocations}"><check all-checked="true"/></field>
+ <field name="commonGoButton" title="${uiLabelMap.CommonGo}" widget-style="smallSubmit"><submit button-type="button"/></field>
+ </form>
+
<!-- ProductPrice -->
<form name="AddProductPrice" type="single" target="createProductPrice" title=""
header-row-style="header-row" default-table-style="basic-table">
Modified: ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml?rev=628297&r1=628296&r2=628297&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml Sat Feb 16 05:53:59 2008
@@ -48,16 +48,59 @@
</section>
</container>
</container>
-
- <!-- include the duplicate product form template -->
- <platform-specific>
- <html><html-template location="component://product/webapp/catalog/product/EditProductDupForm.ftl"/></html>
- </platform-specific>
+ <section>
+ <condition>
+ <and>
+ <not><if-empty field-name="productId"/></not>
+ <not><if-empty field-name="product"/></not>
+ </and>
+ </condition>
+ <widgets>
+ <container style="screenlet">
+ <container style="screenlet-title-bar">
+ <container style="h3">
+ <label text="${uiLabelMap.ProductDuplicateProduct}"/>
+ </container>
+ </container>
+ <container style="screenlet-body">
+ <include-form name="EditProductDup" location="component://product/webapp/catalog/product/ProductForms.xml"/>
+ </container>
+ </container>
+ </widgets>
+ </section>
+ <section>
+ <condition>
+ <and>
+ <not><if-empty field-name="productId"/></not>
+ <not><if-empty field-name="product"/></not>
+ </and>
+ </condition>
+ <widgets>
+ <section>
+ <condition>
+ <if-compare field-name="product.isVirtual" operator="equals" type="String" value="Y"/>
+ </condition>
+ <widgets>
+ <container style="screenlet">
+ <container style="screenlet-title-bar">
+ <container style="h3">
+ <label text="${uiLabelMap.ProductUpdateProductVariants}"/>
+ </container>
+ </container>
+ <container style="screenlet-body">
+ <include-form name="UpdateProductVariants" location="component://product/webapp/catalog/product/ProductForms.xml"/>
+ </container>
+ </container>
+ </widgets>
+ </section>
+ </widgets>
+ </section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
+
<screen name="EditProductPrices">
<section>
<actions>
Modified: ofbiz/trunk/specialpurpose/ebay/widget/EbayScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/widget/EbayScreens.xml?rev=628297&r1=628296&r2=628297&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ebay/widget/EbayScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/ebay/widget/EbayScreens.xml Sat Feb 16 05:53:59 2008
@@ -274,9 +274,16 @@
</container>
</container>
<!-- include the duplicate product form template -->
- <platform-specific>
- <html><html-template location="component://product/webapp/catalog/product/EditProductDupForm.ftl"/></html>
- </platform-specific>
+ <container style="screenlet">
+ <container style="screenlet-title-bar">
+ <container style="h3">
+ <label text="${uiLabelMap.ProductDuplicateProduct}"/>
+ </container>
+ </container>
+ <container style="screenlet-body">
+ <include-form name="EditProductDup" location="component://product/webapp/catalog/product/ProductForms.xml"/>
+ </container>
+ </container>
</decorator-section>
</decorator-screen>
</widgets>
Modified: ofbiz/trunk/specialpurpose/googlebase/widget/GoogleBaseScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/googlebase/widget/GoogleBaseScreens.xml?rev=628297&r1=628296&r2=628297&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/googlebase/widget/GoogleBaseScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/googlebase/widget/GoogleBaseScreens.xml Sat Feb 16 05:53:59 2008
@@ -227,9 +227,16 @@
</container>
</container>
<!-- include the duplicate product form template -->
- <platform-specific>
- <html><html-template location="component://product/webapp/catalog/product/EditProductDupForm.ftl"/></html>
- </platform-specific>
+ <container style="screenlet">
+ <container style="screenlet-title-bar">
+ <container style="h3">
+ <label text="${uiLabelMap.ProductDuplicateProduct}"/>
+ </container>
+ </container>
+ <container style="screenlet-body">
+ <include-form name="EditProductDup" location="component://product/webapp/catalog/product/ProductForms.xml"/>
+ </container>
+ </container>
</decorator-section>
</decorator-screen>
</widgets>