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> |
Free forum by Nabble | Edit this page |