svn commit: r678339 - in /ofbiz/trunk/applications/order: config/ entitydef/ script/org/ofbiz/order/request/ servicedef/ webapp/ordermgr/request/

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

svn commit: r678339 - in /ofbiz/trunk/applications/order: config/ entitydef/ script/org/ofbiz/order/request/ servicedef/ webapp/ordermgr/request/

hansbak-2
Author: hansbak
Date: Sun Jul 20 21:08:30 2008
New Revision: 678339

URL: http://svn.apache.org/viewvc?rev=678339&view=rev
Log:
added partyId field to customerRequestType, created related view to partyReLationship to be able to list customerRequests by reponsible person and added new service to change customer request status

Modified:
    ofbiz/trunk/applications/order/config/OrderUiLabels.xml
    ofbiz/trunk/applications/order/entitydef/entitymodel.xml
    ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml
    ofbiz/trunk/applications/order/script/org/ofbiz/order/request/CustRequestServices.xml
    ofbiz/trunk/applications/order/servicedef/services_request.xml
    ofbiz/trunk/applications/order/webapp/ordermgr/request/RequestForms.xml

Modified: ofbiz/trunk/applications/order/config/OrderUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/config/OrderUiLabels.xml?rev=678339&r1=678338&r2=678339&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/config/OrderUiLabels.xml (original)
+++ ofbiz/trunk/applications/order/config/OrderUiLabels.xml Sun Jul 20 21:08:30 2008
@@ -6331,7 +6331,7 @@
         <value xml:lang="zh">上次修改日期</value>
     </property>
     <property key="OrderRequestList">
-        <value xml:lang="en">Request List</value>
+        <value xml:lang="en">Customer Request List</value>
         <value xml:lang="es">Lista de pedidos</value>
         <value xml:lang="fr">Liste de demandes</value>
         <value xml:lang="it">Lista Richieste</value>

Modified: ofbiz/trunk/applications/order/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/entitydef/entitymodel.xml?rev=678339&r1=678338&r2=678339&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/order/entitydef/entitymodel.xml Sun Jul 20 21:08:30 2008
@@ -1856,10 +1856,17 @@
       <field name="parentTypeId" type="id-ne"></field>
       <field name="hasTable" type="indicator"></field>
       <field name="description" type="description"></field>
+      <field name="partyId" type="id-ne"><description>party or party group(via partyRelationShip entity) responsible for responding to the communication request of this particular type</description></field>
       <prim-key field="custRequestTypeId"/>
       <relation type="one" fk-name="CUST_REQ_TYPE_PAR" title="Parent" rel-entity-name="CustRequestType">
         <key-map field-name="parentTypeId" rel-field-name="custRequestTypeId"/>
       </relation>
+      <relation type="one" fk-name="CUST_PTY_PARTY" rel-entity-name="Party">
+        <key-map field-name="partyId"/>
+      </relation>
+      <relation type="many" fk-name="CUST_PTY_RELAT" rel-entity-name="PartyRelationship">
+        <key-map field-name="partyId" rel-field-name="partyIdFrom"/>
+      </relation>
     </entity>
     <entity entity-name="CustRequestTypeAttr"
             package-name="org.ofbiz.order.request"

Modified: ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml?rev=678339&r1=678338&r2=678339&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml (original)
+++ ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml Sun Jul 20 21:08:30 2008
@@ -1205,6 +1205,22 @@
         <key-map field-name="roleTypeId"/>
       </relation>
     </view-entity>
+    <view-entity entity-name="CustReqAndTypeAndPartyRel"
+            package-name="org.ofbiz.order.request"
+            title="Customer Request And Role View Entity">
+      <member-entity entity-alias="CR" entity-name="CustRequest"/>
+      <member-entity entity-alias="CRT" entity-name="CustRequestType"/>
+      <member-entity entity-alias="PR" entity-name="PartyRelationship"/>
+      <alias-all entity-alias="CR"/>
+      <alias-all entity-alias="PR"/>
+      <alias entity-alias="CRT" name="description" col-alias="typeDescription"/>
+      <view-link entity-alias="CR" rel-entity-alias="CRT">
+        <key-map field-name="custRequestTypeId"/>
+      </view-link>
+      <view-link entity-alias="CRT" rel-entity-alias="PR" rel-optional="true">
+        <key-map field-name="partyId" rel-field-name="partyIdFrom"/>
+      </view-link>
+    </view-entity>
     <view-entity entity-name="CustRequestAndCommEvent"
             package-name="org.ofbiz.order.request"
             title="Customer Request And CommunicationEvent">

Modified: ofbiz/trunk/applications/order/script/org/ofbiz/order/request/CustRequestServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/script/org/ofbiz/order/request/CustRequestServices.xml?rev=678339&r1=678338&r2=678339&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/script/org/ofbiz/order/request/CustRequestServices.xml (original)
+++ ofbiz/trunk/applications/order/script/org/ofbiz/order/request/CustRequestServices.xml Sun Jul 20 21:08:30 2008
@@ -301,4 +301,24 @@
         <field-to-result field-name="newEntity.custRequestStatusId" result-name="custRequestStatusId"/>
     </simple-method>
 
+    <simple-method method-name="setCustRequestStatus" short-description="change the customer request Status">
+        <entity-one entity-name="CustRequest" value-name="custRequest"/>
+        <field-to-result field-name="parameters.statusId" result-name="oldStatusId"/>
+        <if-compare-field field="custRequest.statusId" to-field="parameters.statusId" operator="not-equals">
+            <entity-one entity-name="StatusValidChange" value-name="statusChange">
+                <field-map field-name="statusId" env-name="custRequest.statusId"/>
+                <field-map field-name="statusIdTo" env-name="parameters.statusId"/>
+            </entity-one>
+            <if-empty field="statusChange">
+                <add-error><fail-message message="Status is not a valid change"/></add-error>
+                <log level="error" message="Cannot change from ${custRequest.statusId} to ${parameters.statusId}"/>
+                <check-errors/>
+                <else>
+                    <set field="custRequest.statusId" from-field="parameters.statusId"/>
+                    <store-value value-name="custRequest"/>
+                </else>
+            </if-empty>
+        </if-compare-field>
+    </simple-method>
+
 </simple-methods>

Modified: ofbiz/trunk/applications/order/servicedef/services_request.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/servicedef/services_request.xml?rev=678339&r1=678338&r2=678339&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/servicedef/services_request.xml (original)
+++ ofbiz/trunk/applications/order/servicedef/services_request.xml Sun Jul 20 21:08:30 2008
@@ -137,5 +137,12 @@
         <attribute name="roleTypeId" type="String" mode="IN" optional="true"/>
         <attribute name="custRequestAndRoles" type="java.util.List" mode="OUT" optional="false"/>
     </service>
+    <service name="setCustRequestStatus" engine="simple"
+            location="org/ofbiz/order/request/CustRequestServices.xml" invoke="setCustRequestStatus" auth="true">
+        <description>Set the Customer Request  Status</description>
+        <attribute name="custRequestId" type="String" mode="IN" optional="false"/>
+        <attribute name="statusId" type="String" mode="IN" optional="false"/>
+        <attribute name="oldStatusId" type="String" mode="OUT" optional="true"/>
+    </service>
 </services>
 

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/request/RequestForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/request/RequestForms.xml?rev=678339&r1=678338&r2=678339&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/request/RequestForms.xml (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/request/RequestForms.xml Sun Jul 20 21:08:30 2008
@@ -45,6 +45,7 @@
             </drop-down>
         </field>
         <field name="fromPartyId" position="2"><lookup target-form-name="LookupPartyName"/></field>
+        <field name="currencyUomId"><ignored/></field>
         <field name="maximumAmountUomId"><ignored/></field>
         <field name="custRequestCategoryId"><ignored/></field>
         <field name="fulfillContactMechId"><ignored/></field>
@@ -72,15 +73,17 @@
         <field name="noConditionFind"><hidden value="Y"/></field>
     </form>
 
-    <form name="ListRequests" type="list" use-row-submit="true" list-name="listIt" title=""
-        odd-row-style="alternate-row" default-table-style="basic-table hover-bar" paginate-target="FindRequest">
-          <actions>
+    <form name="ListRequests" type="list" extends="ListRequestList" list-name="listIt">
+        <actions>
           <service service-name="performFind" result-map-name="result" result-map-list-name="listIt">
             <field-map field-name="inputFields" env-name="parameters"/>
             <field-map field-name="entityName" env-name="entityName"/>
             <field-map field-name="orderBy" value="-lastModifiedDate"/>
           </service>
         </actions>
+    </form>
+    <form name="ListRequestList" type="list" use-row-submit="true" list-name="custRequests" title="List of customer requests"
+        odd-row-style="alternate-row" default-table-style="basic-table hover-bar" paginate-target="FindRequest">
         <field name="custRequestName"><hyperlink description="${custRequestName} [${custRequestId}]" target="ViewRequest?custRequestId=${custRequestId}"/></field>
         <field name="priority"><display/></field>
         <field name="responseRequiredDate"><display/></field>