svn commit: r1097431 - in /ofbiz/trunk/applications/product: config/ProductUiLabels.xml webapp/catalog/WEB-INF/controller.xml widget/catalog/ProductForms.xml widget/catalog/ProductScreens.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1097431 - in /ofbiz/trunk/applications/product: config/ProductUiLabels.xml webapp/catalog/WEB-INF/controller.xml widget/catalog/ProductForms.xml widget/catalog/ProductScreens.xml

ashish-18
Author: ashish
Date: Thu Apr 28 12:15:22 2011
New Revision: 1097431

URL: http://svn.apache.org/viewvc?rev=1097431&view=rev
Log:
Applied patch from jira issue OFBIZ-4264 - Implement product price history screen.
Steps for testing.
Goto https://localhost:8443/catalog/control/EditProductPrices?productId=WG-9943
Update product price one or more times.
Hit the History button on "Edit Product Prices" section.
Now "Product Price History" will be displayed.
Thanks Amit for the contribution.

Modified:
    ofbiz/trunk/applications/product/config/ProductUiLabels.xml
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml
    ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml
    ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml

Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.xml?rev=1097431&r1=1097430&r2=1097431&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/config/ProductUiLabels.xml (original)
+++ ofbiz/trunk/applications/product/config/ProductUiLabels.xml Thu Apr 28 12:15:22 2011
@@ -8032,6 +8032,9 @@
         <value xml:lang="zh">产品导出</value>
         <value xml:lang="zh_TW">產品導出</value>
     </property>
+    <property key="PageTitleProductPricesHistory">
+        <value xml:lang="en">Product Price History</value>
+    </property>
     <property key="PageTitleProductStocktake">
         <value xml:lang="en">Product Stocktake</value>
         <value xml:lang="fr">Inventaire d'un article</value>
@@ -14135,6 +14138,9 @@
         <value xml:lang="zh"> 日期/时间记录表示当前时间在开始日期之前或结束日期之后。如果开始日期是红色, 那么关联还没有开始;如果结束日期是红色, 那么关联已经过期了 (并且可能应该删除)。</value>
         <value xml:lang="zh_TW"> 日期/時間記錄表示當前時間在開始日期之前或結束日期之後。如果開始日期是紅色, 那麼關聯還沒有開始;如果結束日期是紅色, 那麼關聯已經過期了 (並且可能應該刪除)。</value>
     </property>
+    <property key="ProductHistory">
+        <value xml:lang="en">History</value>
+    </property>
     <property key="ProductHost">
         <value xml:lang="de">Server</value>
         <value xml:lang="en">Host</value>

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml?rev=1097431&r1=1097430&r2=1097431&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/controller.xml Thu Apr 28 12:15:22 2011
@@ -556,6 +556,10 @@ under the License.
         <response name="success" type="request-redirect" value="EditProductPrices"><redirect-parameter name="productId"/></response>
         <response name="error" type="view" value="EditProductPrices"/>
     </request-map>
+    <request-map uri="ProductPriceHistory">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="ProductPriceHistory"/>
+    </request-map>
     <request-map uri="deleteProductPrice">
         <security https="true" auth="true"/>
         <event type="service" path="" invoke="deleteProductPrice"/>
@@ -3101,6 +3105,7 @@ under the License.
     <view-map name="EditProductParties" type="screen" page="component://product/widget/catalog/ProductScreens.xml#EditProductParties"/>
     <view-map name="showFixedAssetProduct" type="screen" page="component://product/widget/catalog/ProductScreens.xml#showFixedAssetProduct"/>
     <view-map name="newFixedAssetProduct" type="screen" page="component://product/widget/catalog/ProductScreens.xml#newFixedAssetProduct"/>
+    <view-map name="ProductPriceHistory" type="screen" page="component://product/widget/catalog/ProductScreens.xml#ProductPriceHistory"/>
     <view-map name="ProductBarCode.pdf" type="screenfop" page="component://product/widget/catalog/ProductScreens.xml#ProductBarCode.fo" content-type="application/pdf" encoding="none"/>
 
     <view-map name="EditProductContent" type="screen" page="component://product/widget/catalog/ProductScreens.xml#EditProductContent"/>

Modified: ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml?rev=1097431&r1=1097430&r2=1097431&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml Thu Apr 28 12:15:22 2011
@@ -470,6 +470,15 @@ under the License.
         </field>
 
         <field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field>
+
+        <field name="viewHistoryLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext">
+            <hyperlink target="ProductPriceHistory" description="${uiLabelMap.ProductHistory}" also-hidden="false">
+                <parameter param-name="productId"/>
+                <parameter param-name="productPriceTypeId"/>
+                <parameter param-name="fromDate"/>
+            </hyperlink>
+        </field>
+
         <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext">
             <hyperlink target="deleteProductPrice" description="${uiLabelMap.CommonDelete}" also-hidden="false">
                 <parameter param-name="productId"/><parameter param-name="productPriceTypeId"/><parameter param-name="productPricePurposeId"/>
@@ -2077,4 +2086,17 @@ under the License.
         <field name="submitButton" title="${uiLabelMap.CommonCreate}" widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>
 
+    <form name="ListProductPriceHistory" type="list" list-name="productPricesChanges" header-row-style="header-row" default-table-style="basic-table">
+        <field name="productPriceTypeId" title="${uiLabelMap.ProductPriceType}"><display-entity entity-name="ProductPriceType"/></field>
+        <field name="productPricePurposeId" title="${uiLabelMap.CommonPurpose}"><display/></field>
+        <field name="currencyUomId" title="${uiLabelMap.ProductCurrency}"><display/></field>
+        <field name="productStoreGroupId" title="${uiLabelMap.ProductProductStoreGroup}"><display-entity entity-name="ProductStoreGroup" description="${productStoreGroupName}"/></field>
+        <field name="fromDate" title="${uiLabelMap.CommonFromDateTime}"><display/></field>
+        <field name="thruDate" title="${uiLabelMap.CommonThruDate}"><display/></field>
+        <field name="price" title="${uiLabelMap.ProductPrice}"><display/></field>
+        <field name="oldPrice"><display/></field>
+        <field name="changedByUserLogin" title="${uiLabelMap.ProductLastModifiedBy}"><display/></field>
+        <field name="changedDate"><display/></field>
+    </form>
  </forms>
+

Modified: ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml?rev=1097431&r1=1097430&r2=1097431&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml Thu Apr 28 12:15:22 2011
@@ -1427,4 +1427,36 @@ under the License.
             </widgets>
         </section>
     </screen>
+    
+    <screen name="ProductPriceHistory">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleProductPricesHistory"/>
+                <set field="tabButtonItem" value="EditProductPrices"/>
+                <set field="labelTitleProperty" value="PageTitleProductPricesHistory"/>
+                <set field="productId" from-field="parameters.productId"/>
+                <entity-one entity-name="Product" value-field="product"/>
+                <entity-and entity-name="ProductPriceChange" list="productPricesChanges">
+                    <field-map field-name="productId" from-field="productId"/>
+                    <field-map field-name="productPriceTypeId" from-field="parameters.productPriceTypeId"/>
+                    <field-map field-name="fromDate" from-field="parameters.fromDate"/>
+                    <order-by field-name="fromDate"/>
+                </entity-and>
+
+                <property-to-field field="defaultCurrencyUomId" resource="general" property="currency.uom.id.default" default="USD"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonProductDecorator" location="${parameters.productDecoratorLocation}">
+                    <decorator-section name="body">
+                        <link target="EditProductPrices" text="${uiLabelMap.CommonBack}" style="buttontext">
+                            <parameter param-name="productId"/>
+                        </link>
+                        <screenlet title="${uiLabelMap.PageTitleProductPricesHistory}">
+                            <include-form name="ListProductPriceHistory" location="component://product/widget/catalog/ProductForms.xml"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
 </screens>