svn commit: r785113 - in /ofbiz/trunk: applications/order/data/ applications/order/webapp/ordermgr/order/ applications/order/widget/ordermgr/ specialpurpose/myportal/config/ specialpurpose/myportal/data/

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

svn commit: r785113 - in /ofbiz/trunk: applications/order/data/ applications/order/webapp/ordermgr/order/ applications/order/widget/ordermgr/ specialpurpose/myportal/config/ specialpurpose/myportal/data/

ashish-18
Author: ashish
Date: Tue Jun 16 08:44:43 2009
New Revision: 785113

URL: http://svn.apache.org/viewvc?rev=785113&view=rev
Log:
Applied patch from jira issue OFBIZ-2402 (Create a Portlet that show a list of orders placed by a customer)
Thanks to Ravindra Mandre for working on this, Chirag for functional review & Sumit for reviewing and doing minor changes.

Modified:
    ofbiz/trunk/applications/order/data/OrderPortletData.xml
    ofbiz/trunk/applications/order/webapp/ordermgr/order/OrderForms.xml
    ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml
    ofbiz/trunk/specialpurpose/myportal/config/MyPortalUiLabels.xml
    ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml

Modified: ofbiz/trunk/applications/order/data/OrderPortletData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/data/OrderPortletData.xml?rev=785113&r1=785112&r2=785113&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/data/OrderPortletData.xml (original)
+++ ofbiz/trunk/applications/order/data/OrderPortletData.xml Tue Jun 16 08:44:43 2009
@@ -37,5 +37,16 @@
         editFormName="EditCustReqStatusId"
         editFormLocation="component://order/webapp/ordermgr/request/RequestForms.xml"/>
     <PortletPortletCategory portalPortletId="ListCustRequests" portletCategoryId="LIST_CUSTOMER"/>
+    
+    <!--List of order(s) placed by a customer in order -->
+    <PortletCategory portletCategoryId="LIST_CUSTOMER_ORDER" description="List of order(s) placed by a Customer"/>
+    <PortalPortlet portalPortletId="ListCustomerOrders"
+        portletName="List Customer Orders"
+        screenName="ListCustomerOrders"
+        screenLocation="component://order/widget/ordermgr/OrderViewScreens.xml"
+        description="List Orders placed by customer" securityServiceName="portalPermissionIsCustomer" securityMainAction="VIEW"
+        editFormName="EditOrderByCustomer"
+        editFormLocation="component://order/webapp/ordermgr/order/OrderForms.xml"/>
+    <PortletPortletCategory portalPortletId="ListCustomerOrders" portletCategoryId="LIST_CUSTOMER_ORDER"/>
 
 </entity-engine-xml>

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/order/OrderForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/order/OrderForms.xml?rev=785113&r1=785112&r2=785113&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/order/OrderForms.xml (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/order/OrderForms.xml Tue Jun 16 08:44:43 2009
@@ -173,5 +173,49 @@
         <field name="changedDate"><display/></field>
         <field name="changedByUser"><display/></field>
     </form>
+    
+    <!-- Forms Specific to portlet -->
+    <form name="EditOrderByCustomer" extends="CommonPortletEdit" extends-resource="component://common/widget/PortletEditForms.xml">
+        <field name="statusId" entry-name="attributeMap.statusId">
+            <drop-down>
+                <option key="ORDER_CREATED" description="${uiLabelMap.CommonCreated}"/>
+                <option key="ORDER_PROCESSING" description="${uiLabelMap.CommonProcessing}"/>
+                <option key="ORDER_APPROVED" description="${uiLabelMap.CommonApproved}"/>
+                <option key="ORDER_SENT" description="${uiLabelMap.CommonSent}"/>
+                <option key="ORDER_HELD" description="${uiLabelMap.CommonHeld}"/>
+                <option key="ORDER_COMPLETED" description="${uiLabelMap.CommonCompleted}"/>
+                <option key="ORDER_REJECTED" description="${uiLabelMap.CommonRejected}"/>
+                <option key="ORDER_CANDELLED" description="${uiLabelMap.CommonCancelled}"/>
+            </drop-down>
+        </field>
+        <field name="roleTypeId" entry-name="attributeMap.roleTypeId">
+            <drop-down>
+                <option key="PLACING_CUSTOMER" description="${uiLabelMap.MyPortalPlacingCustomer}"/>
+                <option key="SHIP_TO_CUSTOMER" description="${uiLabelMap.MyPortalShipToCustomer}"/>
+                <option key="END_USER_CUSTOMER" description="${uiLabelMap.MyPortalEndUserCustomer}"/>
+                <option key="BILL_TO_CUSTOMER" description="${uiLabelMap.MyPortalBillToCustomer}"/>
+            </drop-down>
+        </field>
+        <field name="updateButton"><submit/></field>
+    </form>
+    <form name="ListCustomerOrders" type="list" target="" list-name="listIt" title="" odd-row-style="alternate-row"
+        header-row-style="header-row-2" default-table-style="basic-table hover-bar">
+        <actions>
+            <entity-and entity-name="OrderHeaderAndRoles">
+                <field-map field-name="partyId" from-field="partyId"/>
+                <field-map field-name="roleTypeId" from-field="roleTypeId"/>
+                <field-map field-name="statusId" from-field="statusId"/>
+            </entity-and>
+        </actions>
+        <field name="orderTypeId" title="${uiLabelMap.FormFieldTitle_orderTypeId}"><display/></field>
+        <field name="orderId" title="${uiLabelMap.OrderOrderId}"><display/></field>
+        <field name="orderName" title="${uiLabelMap.OrderOrderName}"><display/></field>
+        <field name="remainingSubTotal" title="${uiLabelMap.FormFieldTitle_remainingSubTotal}"><display/></field>
+        <field name="grandTotal" title="${uiLabelMap.OrderGrandTotal}"><display/></field>
+        <field name="statusId"><display/></field>
+        <field name="orderDate" title="${uiLabelMap.OrderOrderDate}"><display/></field>
+        <field name="partyId" title="${uiLabelMap.PartyPartyId}"><display/></field>
+        <field name="roleTypeId" title="${uiLabelMap.FormFieldTitle_roleTypeId}"><display/></field>
+    </form>
 
 </forms>
\ No newline at end of file

Modified: ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml?rev=785113&r1=785112&r2=785113&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml (original)
+++ ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml Tue Jun 16 08:44:43 2009
@@ -436,4 +436,23 @@
         </section>
     </screen>
 
+    <!-- Screens Specific to portlet -->
+    <screen name="ListCustomerOrders">
+        <section>
+            <actions>
+                <property-map resource="MyPortalUiLabels" map-name="uiLabelMap" global="true"/>
+                <set field="partyId" from-field="userLogin.partyId"/>
+                <set field="statusId" from-field="statusId"/>
+                <set field="roleTypeId" from-field="roleTypeId"/>
+                <set field="screenletTitle" from-field="uiLabelMap.MyPortalMyOrders"/>
+                <script location="component://common/webcommon/WEB-INF/actions/includes/retrievePortletAttributes.groovy"/>
+            </actions>
+            <widgets>
+                <screenlet title="${screenletTitle} ${partyId} ${statusId}" navigation-form-name="ListCustomerOrders" >
+                   <include-form name="ListCustomerOrders" location="component://order/webapp/ordermgr/order/OrderForms.xml"/>
+                </screenlet>
+            </widgets>
+        </section>
+    </screen>
+
 </screens>
\ No newline at end of file

Modified: ofbiz/trunk/specialpurpose/myportal/config/MyPortalUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/config/MyPortalUiLabels.xml?rev=785113&r1=785112&r2=785113&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/myportal/config/MyPortalUiLabels.xml (original)
+++ ofbiz/trunk/specialpurpose/myportal/config/MyPortalUiLabels.xml Tue Jun 16 08:44:43 2009
@@ -25,6 +25,9 @@
         <value xml:lang="it">Mia pagina</value>
         <value xml:lang="th">แอปพริเคชันของฉัน</value>
     </property>
+    <property key="MyPortalBillToCustomer">
+        <value xml:lang="en">Bill To Customer</value>
+    </property>
     <property key="MyPortalCaptchaMissingError">
         <value xml:lang="en">Verify code captcha is missing or wrong</value>
         <value xml:lang="fr">Vérifier le code captcha, il est absent ou erroné</value>
@@ -71,6 +74,9 @@
         <value xml:lang="it">Mio portale</value>
         <value xml:lang="th">ส่วนตัว</value>
     </property>
+    <property key="MyPortalEndUserCustomer">
+        <value xml:lang="en">End User Customer</value>
+    </property>    
     <property key="MyPortalFirstNameMissing">
         <value xml:lang="en">Your firstName is missing</value>
         <value xml:lang="fr">Votre prénom est absent</value>
@@ -89,6 +95,9 @@
         <value xml:lang="it">Cognome mancante</value>
         <value xml:lang="th">กรุณากรอกนามสกุลของท่าน</value>
     </property>
+    <property key="MyPortalMyOrders">
+        <value xml:lang="en">My Orders</value>
+    </property>
     <property key="MyPortalMyTasks">
         <value xml:lang="en">myTasks</value>
         <value xml:lang="it">Miei compiti</value>
@@ -165,6 +174,9 @@
         <value xml:lang="it">Mio profilo</value>
         <value xml:lang="th">ประวัติส่วนตัวของฉัน</value>
     </property>
+    <property key="MyPortalPlacingCustomer">
+        <value xml:lang="en">Placing Customer</value>
+    </property>
     <property key="MyPortalRegisterComplete">
         <value xml:lang="en">Register of new person is complete...Please </value>
         <value xml:lang="fr">L'enregistrement de la nouvelle personne est complet...SVP</value>
@@ -187,6 +199,9 @@
         <value xml:lang="it">Invia email ad ogni modifica della richiesta cliente</value>
         <value xml:lang="th">ส่งอีเมล์ถึงลูกค้าที่เปลี่ยนความต้องการ</value>
     </property>
+    <property key="MyPortalShipToCustomer">
+        <value xml:lang="en">Ship To Customer</value>
+    </property>
     <property key="MyPortalTaskActEndDate">
         <value xml:lang="en">Task Act End</value>
         <value xml:lang="fr">Fin réelle de de la tâche</value>

Modified: ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml?rev=785113&r1=785112&r2=785113&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml (original)
+++ ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml Tue Jun 16 08:44:43 2009
@@ -48,6 +48,7 @@
     <PortalPage portalPageId="MYPORTAL_CUSTOMER1" sequenceNum="100" portalPageName="My Profile" description="The OFBiz My Portal Profile page" ownerUserLoginId="_NA_" parentPortalPageId="MYPORTAL_CUSTOMER"/>
     <PortalPage portalPageId="MYPORTAL_CUSTOMER2" sequenceNum="200" portalPageName="Invoices" description="The OFBiz My Portal Invoices page" ownerUserLoginId="_NA_" parentPortalPageId="MYPORTAL_CUSTOMER"/>
     <PortalPage portalPageId="MYPORTAL_CUSTOMER3" sequenceNum="300" portalPageName="Projects" description="The OFBiz My Portal Project page" ownerUserLoginId="_NA_" parentPortalPageId="MYPORTAL_CUSTOMER"/>
+    <PortalPage portalPageId="MYPORTAL_CUSTOMER4" sequenceNum="400" portalPageName="Orders" description="The OFBiz My Portal Order page" ownerUserLoginId="_NA_" parentPortalPageId="MYPORTAL_CUSTOMER"/>
 
     <PortalPageColumn portalPageId="MYPORTAL_NONE" columnSeqId="00001"/>
     <PortalPageColumn portalPageId="MYPORTAL_NONE" columnSeqId="00002" columnWidthPercentage="50"/>
@@ -73,6 +74,7 @@
     <PortalPageColumn portalPageId="MYPORTAL_CUSTOMER1" columnSeqId="00002" columnWidthPercentage="50"/>
     <PortalPageColumn portalPageId="MYPORTAL_CUSTOMER2" columnSeqId="00001"/>
     <PortalPageColumn portalPageId="MYPORTAL_CUSTOMER3" columnSeqId="00001"/>
+    <PortalPageColumn portalPageId="MYPORTAL_CUSTOMER4" columnSeqId="00001"/>
 
     <PortalPagePortlet portalPageId="MYPORTAL_NONE" portalPortletId="party" portletSeqId="00001" columnSeqId="00001" sequenceNum="0"/>
     <PortalPagePortlet portalPageId="MYPORTAL_NONE" portalPortletId="contact" portletSeqId="00001" columnSeqId="00001" sequenceNum="1"/>
@@ -122,6 +124,7 @@
     <PortletAttribute portalPageId="MYPORTAL_CUSTOMER" portalPortletId="ListCustRequests" portletSeqId="00002" attrName="statusGroup" attrValue="COMPLETED"/>
     <PortalPagePortlet portalPageId="MYPORTAL_CUSTOMER" portalPortletId="ListCustRequests" portletSeqId="00002" columnSeqId="00001"  sequenceNum="2"/>
     <PortletAttribute portalPageId="MYPORTAL_CUSTOMER" portalPortletId="ListCustRequests" portletSeqId="00002" attrName="statusGroup" attrValue="OPEN"/>
+    
     <PortletAttribute portalPageId="MYPORTAL_CUSTOMER" portalPortletId="ListCustRequests" portletSeqId="00002" attrName="otherContacts" attrValue="Y"/>
     <PortalPagePortlet portalPageId="MYPORTAL_CUSTOMER" portalPortletId="MyCommunications" portletSeqId="00001" columnSeqId="00001"  sequenceNum="4"/>
     <PortalPagePortlet portalPageId="MYPORTAL_CUSTOMER1" portalPortletId="party" portletSeqId="00001" columnSeqId="00001"  sequenceNum="6"/>
@@ -135,7 +138,11 @@
     <PortalPagePortlet portalPageId="MYPORTAL_CUSTOMER1" portalPortletId="MYTASKSPARTY" portletSeqId="00001" columnSeqId="00002"  sequenceNum="8"/>
     <PortalPagePortlet portalPageId="MYPORTAL_CUSTOMER2" portalPortletId="ListCustomerInvoices" portletSeqId="00001" columnSeqId="00001"  sequenceNum="0"/>
     <PortalPagePortlet portalPageId="MYPORTAL_CUSTOMER3" portalPortletId="ListCustomerProjects" portletSeqId="00001" columnSeqId="00001"  sequenceNum="0"/>
-
+    
+    <PortalPagePortlet portalPageId="MYPORTAL_CUSTOMER4" portalPortletId="ListCustomerOrders" portletSeqId="00001" columnSeqId="00001" sequenceNum="0"/>
+    <PortletAttribute portalPageId="MYPORTAL_CUSTOMER4" portalPortletId="ListCustomerOrders" portletSeqId="00001" attrName="statusId" attrValue="ORDER_APPROVED"/>
+    <PortletAttribute portalPageId="MYPORTAL_CUSTOMER4" portalPortletId="ListCustomerOrders" portletSeqId="00001" attrName="roleTypeId" attrValue="PLACING_CUSTOMER"/>
+    
     <PortletPortletCategory portalPortletId="ListCustomerProjects" portletCategoryId="LIST_CUSTOMER"/>
     <PortletPortletCategory portalPortletId="ListCustomerInvoices" portletCategoryId="LIST_CUSTOMER"/>