svn commit: r779041 - in /ofbiz/trunk/applications: order/entitydef/entitymodel_view.xml product/entitydef/entitymodel.xml product/script/org/ofbiz/shipment/picklist/PicklistServices.xml

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

svn commit: r779041 - in /ofbiz/trunk/applications: order/entitydef/entitymodel_view.xml product/entitydef/entitymodel.xml product/script/org/ofbiz/shipment/picklist/PicklistServices.xml

mor-2
Author: mor
Date: Wed May 27 07:44:17 2009
New Revision: 779041

URL: http://svn.apache.org/viewvc?rev=779041&view=rev
Log:
Done following fixes:
1) Moved the view entity to correct package.
2) Changed the view name as well as the entities used. Now the records are coming as expected.
3) Corresponding changes in the findOrdersToPickMove service.

The main purpose of this view entity is to find out the location (areaId) of the inventory item that is reserved/picked for a particular order. For example if an order has two
order items X and Y and items X is picked from area A and item Y is picked from area B of a facility (where obviously area A and B are associated to a pick/primary location),
then while grouping this order in facility > picking screen by "Group by Warehouse Area" method will show order under Multi Locations group. To clarify more on this grouping
method, grouping is done only with the areaId and the locationSeqId (which is a combination of areaId, aisleId, sectionId, levelId, positionId).  

Modified:
    ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml
    ofbiz/trunk/applications/product/entitydef/entitymodel.xml
    ofbiz/trunk/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml

Modified: ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml?rev=779041&r1=779040&r2=779041&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml (original)
+++ ofbiz/trunk/applications/order/entitydef/entitymodel_view.xml Wed May 27 07:44:17 2009
@@ -74,6 +74,43 @@
         <key-map field-name="orderId"/>
       </view-link>
     </view-entity>
+
+    <view-entity entity-name="OrderHeaderAndItemFacilityLocation"
+            package-name="org.ofbiz.order.order"
+           title="OrderHeader, OrderItemShipGrpInvRes, OrderItemShipGroup, InventoryItem and FacilityLocation View Entity">
+      <member-entity entity-alias="OH" entity-name="OrderHeader"/>
+      <member-entity entity-alias="OISGIR" entity-name="OrderItemShipGrpInvRes"/>
+      <member-entity entity-alias="OISG" entity-name="OrderItemShipGroup"/>
+      <member-entity entity-alias="II" entity-name="InventoryItem"/>
+      <member-entity entity-alias="FL" entity-name="FacilityLocation"/>
+
+      <alias entity-alias="OH" name="orderId"/>
+      <alias entity-alias="OISGIR" name="orderItemSeqId"/>
+      <alias entity-alias="OISGIR" name="inventoryItemId"/>
+      <alias entity-alias="OISG" name="shipGroupSeqId"/>
+      <alias entity-alias="OISG" name="shipmentMethodTypeId"/>
+      <alias entity-alias="OISG" name="carrierPartyId"/>
+      <alias entity-alias="II" name="productId"/>
+      <alias entity-alias="II" name="facilityId"/>
+      <alias entity-alias="II" name="locationSeqId"/>
+      <alias entity-alias="FL" name="locationTypeEnumId"/>
+      <alias entity-alias="FL" name="areaId"/>
+      <view-link entity-alias="OH" rel-entity-alias="OISGIR">
+        <key-map field-name="orderId"/>
+      </view-link>
+      <view-link entity-alias="OISGIR" rel-entity-alias="OISG">
+        <key-map field-name="orderId"/>
+        <key-map field-name="shipGroupSeqId"/>
+      </view-link>
+      <view-link entity-alias="OISGIR" rel-entity-alias="II">
+        <key-map field-name="inventoryItemId"/>
+      </view-link>
+      <view-link entity-alias="II" rel-entity-alias="FL">
+        <key-map field-name="facilityId"/>
+        <key-map field-name="locationSeqId"/>
+      </view-link>
+    </view-entity>
+
     <view-entity entity-name="OrderHeaderAndPaymentPref"
             package-name="org.ofbiz.order.order"
             never-cache="true"
@@ -1577,5 +1614,4 @@
       <key-map field-name="orderId"/>
     </view-link>
   </view-entity>
-</entitymodel>
-
+</entitymodel>
\ No newline at end of file

Modified: ofbiz/trunk/applications/product/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitymodel.xml?rev=779041&r1=779040&r2=779041&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/product/entitydef/entitymodel.xml Wed May 27 07:44:17 2009
@@ -4623,39 +4623,4 @@
       <key-map field-name="productId"/>
     </view-link>
   </view-entity>
-
-  <view-entity entity-name="OrderItemAndFacilityLocationView" package-name="org.ofbiz.product.facility" title="Order Item And Facility Location View Entity">
-    <member-entity entity-alias="SMT" entity-name="ShipmentMethodType"/>
-    <member-entity entity-alias="OISG" entity-name="OrderItemShipGroup"/>
-    <member-entity entity-alias="OI" entity-name="OrderItem"/>
-    <member-entity entity-alias="PFL" entity-name="ProductFacilityLocation"/>
-    <member-entity entity-alias="FL" entity-name="FacilityLocation"/>
-    <alias entity-alias="OISG" name="orderId"/>
-    <alias entity-alias="OISG" name="shipGroupSeqId"/>
-    <alias entity-alias="OISG" name="shipmentMethodTypeId"/>
-    <alias entity-alias="OISG" name="carrierPartyId"/>
-    <alias entity-alias="OI" name="productId"/>
-    <alias entity-alias="OI" name="orderItemSeqId"/>
-    <alias entity-alias="PFL" name="locationSeqId"/>
-    <alias entity-alias="PFL" name="facilityId"/>
-    <alias entity-alias="FL" name="locationTypeEnumId"/>
-    <alias entity-alias="FL" name="areaId"/>
-    <view-link entity-alias="OI" rel-entity-alias="OISG">
-      <key-map field-name="orderId"/>
-    </view-link>
-    <view-link entity-alias="OISG" rel-entity-alias="SMT">
-      <key-map field-name="shipmentMethodTypeId"/>
-    </view-link>
-    <view-link entity-alias="OI" rel-entity-alias="PFL">
-      <key-map field-name="productId"/>
-    </view-link>
-    <view-link entity-alias="PFL" rel-entity-alias="FL">
-      <key-map field-name="facilityId"/>
-      <key-map field-name="locationSeqId"/>
-    </view-link>
-    <relation type="one-nofk" rel-entity-name="ShipmentMethodType">
-      <key-map field-name="shipmentMethodTypeId"/>
-    </relation>
-  </view-entity>
-
-</entitymodel>
+</entitymodel>
\ No newline at end of file

Modified: ofbiz/trunk/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml?rev=779041&r1=779040&r2=779041&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml Wed May 27 07:44:17 2009
@@ -103,7 +103,7 @@
                 <condition-expr field-name="orderId" from-field="orderHeader.orderId"/>
             </entity-count>
 
-            <entity-condition entity-name="OrderItemAndFacilityLocationView" list="OrderItemAndFacilityLocationList" distinct="true">
+            <entity-condition entity-name="OrderHeaderAndItemFacilityLocation" list="OrderHeaderAndItemFacilityLocationList" distinct="true">
                 <condition-list combine="and">
                     <condition-expr field-name="orderId" from-field="orderHeader.orderId"/>
                     <condition-expr field-name="locationTypeEnumId" value="FLT_PICKLOC"/>
@@ -115,7 +115,7 @@
             <set field="groupName1"/>
             <set field="groupName2"/>
             <set field="groupName3"/>            
-            <iterate list="OrderItemAndFacilityLocationList" entry="OrderItemAndFacilityLocation">
+            <iterate list="OrderHeaderAndItemFacilityLocationList" entry="orderHeaderAndItemFacilityLocation">
                 <!-- set groupName for order according to the options selected by the user -->
                 <if>
                     <condition>
@@ -129,13 +129,13 @@
                         </or>
                     </condition>
                     <then>
-                        <set field="groupName1" from-field="OrderItemAndFacilityLocation.shipmentMethodTypeId"/>
+                        <set field="groupName1" from-field="orderHeaderAndItemFacilityLocation.shipmentMethodTypeId"/>
                     </then>
                 </if>
 
                 <if-compare field="groupByWarehouseArea" operator="equals" value="Y">
-                    <set field="groupName2" from-field="OrderItemAndFacilityLocation.areaId"/>
-                    <set field="locationGroupName" from-field="OrderItemAndFacilityLocation.areaId"/>
+                    <set field="groupName2" from-field="orderHeaderAndItemFacilityLocation.areaId"/>
+                    <set field="locationGroupName" from-field="orderHeaderAndItemFacilityLocation.areaId"/>
                 </if-compare>
 
                 <if>