You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by mo...@apache.org on 2009/05/19 12:31:01 UTC
svn commit: r776262 - in /ofbiz/trunk/applications:
order/webapp/ordermgr/WEB-INF/controller.xml
order/webapp/ordermgr/order/orderinfo.ftl
product/script/org/ofbiz/shipment/picklist/PicklistServices.xml
product/servicedef/services_picklist.xml
Author: mor
Date: Tue May 19 10:31:00 2009
New Revision: 776262
URL: http://svn.apache.org/viewvc?rev=776262&view=rev
Log:
Added feature to generate pick sheet PDF for an order from Order Detail Page.
Slightly modified patch from Anurag Singh Senger, part of OFBIZ-2481 (https://issues.apache.org/jira/browse/OFBIZ-2481)
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml
ofbiz/trunk/applications/order/webapp/ordermgr/order/orderinfo.ftl
ofbiz/trunk/applications/product/script/org/ofbiz/shipment/picklist/PicklistServices.xml
ofbiz/trunk/applications/product/servicedef/services_picklist.xml
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=776262&r1=776261&r2=776262&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml Tue May 19 10:31:00 2009
@@ -1508,6 +1508,7 @@
<request-map uri="order.pdf"><security https="true" auth="true"/><response name="success" type="view" value="OrderPDF"/></request-map>
<request-map uri="return.pdf"><security https="true" auth="true"/><response name="success" type="view" value="ReturnPDF"/></request-map>
<request-map uri="shipGroups.pdf"><security https="true" auth="true"/><response name="success" type="view" value="ShipGroupsPDF"/></request-map>
+ <request-map uri="orderPickSheet.pdf"><security https="true" auth="true"/><response name="success" type="view" value="OrderPickSheetPDF"/></request-map>
<request-map uri="LookupProductCategory">
<security auth="true" https="true"/>
@@ -1690,6 +1691,7 @@
<view-map name="OrderPDF" type="screenfop" page="component://order/widget/ordermgr/OrderPrintScreens.xml#OrderPDF" content-type="application/pdf" encoding="none"/>
<view-map name="ReturnPDF" type="screenfop" page="component://order/widget/ordermgr/OrderPrintScreens.xml#ReturnPDF" content-type="application/pdf" encoding="none"/>
<view-map name="ShipGroupsPDF" type="screenfop" page="component://order/widget/ordermgr/OrderPrintScreens.xml#ShipGroupsPDF" content-type="application/pdf" encoding="none"/>
+ <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"/>
<!-- end of view mappings -->
Modified: ofbiz/trunk/applications/order/webapp/ordermgr/order/orderinfo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/order/orderinfo.ftl?rev=776262&r1=776261&r2=776262&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/order/orderinfo.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/order/orderinfo.ftl Tue May 19 10:31:00 2009
@@ -25,7 +25,14 @@
</#if>
<#assign orderType = orderHeader.getRelatedOne("OrderType")/>
<li class="h3"> ${orderType?if_exists.get("description", locale)?default(uiLabelMap.OrderOrder)} #<a href="<@o...@ofbizUrl>">${orderId}</a> ${externalOrder?if_exists} [ <a href="<@o...@ofbizUrl>" target="_blank">PDF</a> ]</li>
-
+ <#if currentStatus.statusId == "ORDER_APPROVED" && orderHeader.orderTypeId == "SALES_ORDER">
+ <li class="h3"><a href="javascript:document.PrintOrderPickSheet.submit()">${uiLabelMap.FormFieldTitle_printPickSheet}</a></li>
+ <form name="PrintOrderPickSheet" method="post" action="<@o...@ofbizUrl>">
+ <input type="hidden" name="facilityId" value="${storeFacilityId?if_exists}"/>
+ <input type="hidden" name="orderId" value="${orderHeader.orderId?if_exists}"/>
+ <input type="hidden" name="maxNumberOfOrdersToPrint" value="1"/>
+ </form>
+ </#if>
<#if currentStatus.statusId == "ORDER_CREATED" || currentStatus.statusId == "ORDER_PROCESSING">
<li><a href="javascript:document.OrderApproveOrder.submit()">${uiLabelMap.OrderApproveOrder}</a></li>
<form name="OrderApproveOrder" method="post" action="<@o...@ofbizUrl>">
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=776262&r1=776261&r2=776262&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 Tue May 19 10:31:00 2009
@@ -68,24 +68,27 @@
<set field="groupByNoOfOrderItems" from-field="parameters.groupByNoOfOrderItems"/>
<set field="groupByWarehouseArea" from-field="parameters.groupByWarehouseArea"/>
<now-timestamp field="nowTimestamp"/>
-
- <if-empty field="parameters.orderHeaderList">
- <log level="info" message="No order header list found in parameters; finding orders to pick."/>
-
- <entity-condition entity-name="OrderHeader" list="orderHeaderList">
- <condition-list combine="and">
- <condition-expr field-name="orderTypeId" value="SALES_ORDER"/>
- <condition-expr field-name="statusId" value="ORDER_APPROVED"/>
- <condition-expr field-name="isRushOrder" from-field="parameters.isRushOrder" ignore-if-empty="true"/>
- </condition-list>
- <order-by field-name="+orderDate"/><!-- oldest first -->
- </entity-condition>
+ <if-not-empty field="parameters.orderId">
+ <entity-one entity-name="OrderHeader" value-field="orderHeader"/>
+ <field-to-list field="orderHeader" list="orderHeaderList"/>
<else>
- <set from-field="parameters.orderHeaderList" field="orderHeaderList"/>
- <log level="info" message="Found orderHeaderList in parameters; using: ${orderHeaderList}"/>
+ <if-empty field="parameters.orderHeaderList">
+ <log level="info" message="No order header list found in parameters; finding orders to pick."/>
+ <entity-condition entity-name="OrderHeader" list="orderHeaderList">
+ <condition-list combine="and">
+ <condition-expr field-name="orderTypeId" value="SALES_ORDER"/>
+ <condition-expr field-name="statusId" value="ORDER_APPROVED"/>
+ <condition-expr field-name="isRushOrder" from-field="parameters.isRushOrder" ignore-if-empty="true"/>
+ </condition-list>
+ <order-by field-name="+orderDate"/><!-- oldest first -->
+ </entity-condition>
+ <else>
+ <set from-field="parameters.orderHeaderList" field="orderHeaderList"/>
+ <log level="info" message="Found orderHeaderList in parameters; using: ${orderHeaderList}"/>
+ </else>
+ </if-empty>
</else>
- </if-empty>
-
+ </if-not-empty>
<set field="maxNumberOfOrders" type="Long" from-field="parameters.maxNumberOfOrders" set-if-empty="true"/>
<set field="numberSoFar" type="Long" value="0"/>
<iterate entry="orderHeader" list="orderHeaderList">
Modified: ofbiz/trunk/applications/product/servicedef/services_picklist.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_picklist.xml?rev=776262&r1=776261&r2=776262&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/servicedef/services_picklist.xml (original)
+++ ofbiz/trunk/applications/product/servicedef/services_picklist.xml Tue May 19 10:31:00 2009
@@ -45,6 +45,7 @@
<attribute name="groupByNoOfOrderItems" type="String" mode="IN" optional="true"/>
<attribute name="groupByWarehouseArea" type="String" mode="IN" optional="true"/>
<attribute name="groupByShippingMethod" type="String" mode="IN" optional="true"/>
+ <attribute name="orderId" type="String" mode="IN" optional="true"/>
</service>
<!-- Persisted Picklist Services -->
@@ -71,6 +72,7 @@
<attribute name="groupByWarehouseArea" type="String" mode="IN" optional="true"/>
<attribute name="groupByShippingMethod" type="String" mode="IN" optional="true"/>
<attribute name="pickMoveInfoList" type="List" mode="OUT" optional="false"/>
+ <attribute name="orderId" type="String" mode="IN" optional="true"/>
</service>
<service name="getPicklistDisplayInfo" engine="simple"