You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2016/01/14 22:31:23 UTC
svn commit: r1724697 -
/ofbiz/branches/release14.12/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy
Author: jleroux
Date: Thu Jan 14 21:31:23 2016
New Revision: 1724697
URL: http://svn.apache.org/viewvc?rev=1724697&view=rev
Log:
Backports r1724689 from trunk by hand
Modified:
ofbiz/branches/release14.12/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy
Modified: ofbiz/branches/release14.12/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy?rev=1724697&r1=1724696&r2=1724697&view=diff
==============================================================================
--- ofbiz/branches/release14.12/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy (original)
+++ ofbiz/branches/release14.12/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy Thu Jan 14 21:31:23 2016
@@ -42,10 +42,14 @@ fromPartyId = parameters.fromPartyId;
if (!orderHeader && orderId) {
orderHeader = from("OrderHeader").where("orderId", orderId).queryOne();
- if (parameters.facilityId) {
- response.setHeader("Content-Disposition","attachment; filename=\"PickSheet" + orderId + ".pdf" + "\";");
- } else {
- response.setHeader("Content-Disposition","attachment; filename=\"" + orderId + ".pdf" + "\";");
+ try {
+ if (parameters.facilityId) {
+ response.setHeader("Content-Disposition","attachment; filename=\"PickSheet" + orderId + ".pdf" + "\";");
+ } else {
+ response.setHeader("Content-Disposition","attachment; filename=\"" + orderId + ".pdf" + "\";");
+ }
+ } catch (MissingPropertyException e) {
+ // This hack for OFBIZ-6792 to avoid "groovy.lang.MissingPropertyException: No such property: response for class: CompanyHeader" when response does exist (in sendOrderConfirmation service)
}
} else if (shipmentId) {
shipment = from("Shipment").where("shipmentId", shipmentId).queryOne();
@@ -54,7 +58,11 @@ if (!orderHeader && orderId) {
if (!invoice && invoiceId) {
invoice = from("Invoice").where("invoiceId", invoiceId).queryOne();
- response.setHeader("Content-Disposition","attachment; filename=\"" + invoiceId + ".pdf" + "\";");
+ try {
+ response.setHeader("Content-Disposition","attachment; filename=\"" + invoiceId + ".pdf" + "\";");
+ } catch (MissingPropertyException e) {
+ // This hack for OFBIZ-6792 to avoid "groovy.lang.MissingPropertyException: No such property: response for class: CompanyHeader" when response does exist (in sendOrderConfirmation service)
+ }
}
if (!returnHeader && returnId) {