You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2010/05/06 15:55:48 UTC

svn commit: r941732 - in /ofbiz/trunk/applications/order: webapp/ordermgr/WEB-INF/actions/order/SendConfirmationEmail.groovy webapp/ordermgr/WEB-INF/controller.xml widget/ordermgr/OrderViewScreens.xml

Author: jacopoc
Date: Thu May  6 13:55:48 2010
New Revision: 941732

URL: http://svn.apache.org/viewvc?rev=941732&view=rev
Log:
Added screen (similar to the existing one for order confirmation) to manually send an order completion email. The code shared by the two screens could be improved to make it more reusable.


Modified:
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/SendConfirmationEmail.groovy
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml
    ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/SendConfirmationEmail.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/SendConfirmationEmail.groovy?rev=941732&r1=941731&r2=941732&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/SendConfirmationEmail.groovy (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/SendConfirmationEmail.groovy Thu May  6 13:55:48 2010
@@ -37,7 +37,7 @@ context.donePage = donePage;
 // Provide the correct order confirmation ProductStoreEmailSetting, if one exists
 orderHeader = delegator.findByPrimaryKey("OrderHeader", [orderId : orderId]);
 if (orderHeader.productStoreId) {
-    productStoreEmailSetting = delegator.findByPrimaryKeyCache("ProductStoreEmailSetting", [productStoreId : orderHeader.productStoreId, emailType : "PRDS_ODR_CONFIRM"]);
+    productStoreEmailSetting = delegator.findByPrimaryKeyCache("ProductStoreEmailSetting", [productStoreId : orderHeader.productStoreId, emailType : emailType]);
     if (productStoreEmailSetting) {
         context.productStoreEmailSetting = productStoreEmailSetting;
     }

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml?rev=941732&r1=941731&r2=941732&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml Thu May  6 13:55:48 2010
@@ -85,6 +85,10 @@ under the License.
         <security https="true" auth="true"/>
         <response name="success" type="view" value="SendConfirmationMail"/>
     </request-map>
+    <request-map uri="completionmailedit">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="SendCompletionMail"/>
+    </request-map>
     <request-map uri="sendconfirmationmail">
         <security https="true" auth="true"/>
         <event type="service" path="" invoke="sendMail"/>
@@ -1893,6 +1897,7 @@ under the License.
     <view-map name="OrderPickSheetPDF" type="screenfop" page="component://product/widget/facility/FacilityScreens.xml#PrintPickSheets.fo" content-type="application/pdf" encoding="none"/>
 
     <view-map name="SendConfirmationMail" type="screen" page="component://order/widget/ordermgr/OrderViewScreens.xml#SendOrderConfirmation"/>
+    <view-map name="SendCompletionMail" type="screen" page="component://order/widget/ordermgr/OrderViewScreens.xml#SendOrderCompletion"/>
     <view-map name="ReturnHistory" type="screen" page="component://order/widget/ordermgr/OrderReturnScreens.xml#OrderReturnHistory"/>
     <!-- end of view mappings -->
 </site-conf>

Modified: ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml?rev=941732&r1=941731&r2=941732&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml (original)
+++ ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml Thu May  6 13:55:48 2010
@@ -333,6 +333,7 @@ under the License.
             <actions>
                 <set field="titleProperty" value="OrderSendConfirmationEmail"/>
                 <set field="headerItem" value="findorders"/>
+                <set field="emailType" value="PRDS_ODR_CONFIRM"/>
                 <script location="component://order/webapp/ordermgr/WEB-INF/actions/order/SendConfirmationEmail.groovy"/>
             </actions>
             <widgets>
@@ -346,6 +347,25 @@ under the License.
             </widgets>
         </section>
     </screen>
+    <screen name="SendOrderCompletion">
+        <section>
+            <actions>
+                <set field="titleProperty" value="OrderSendConfirmationEmail"/>
+                <set field="headerItem" value="findorders"/>
+                <set field="emailType" value="PRDS_ODR_COMPLETE"/>
+                <script location="component://order/webapp/ordermgr/WEB-INF/actions/order/SendConfirmationEmail.groovy"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonOrderViewDecorator">
+                    <decorator-section name="body">
+                        <platform-specific>
+                            <html><html-template location="component://csstore/webapp/csstore/order/sendconfirmationemail.ftl"/></html>
+                        </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
     <screen name="ListOrderTerms">
         <section>
             <actions>