Author: jleroux
Date: Sat Jun 15 16:27:49 2013
New Revision: 1493394
URL:
http://svn.apache.org/r1493394Log:
"Applied fix from trunk for revision: 1493393"
------------------------------------------------------------------------
r1493393 | jleroux | 2013-06-15 18:22:53 +0200 (sam., 15 juin 2013) | 7 lines
A fixing patch from Sergei Biletnikov for "Search orders by good identification"
https://issues.apache.org/jira/browse/OFBIZ-5031 currentCarrierShipmentMethod = delegator.findByAnd("CarrierShipmentMethod", [partyId : carrierPartyId, shipmentMethodTypeId : shipmentMethodTypeId], null, false);
is not correct, the result is the list, so the remedy is simple:
currentCarrierShipmentMethod = EntityUtil.getFirst(delegator.findByAnd("CarrierShipmentMethod", [partyId : carrierPartyId, shipmentMethodTypeId : shipmentMethodTypeId], null, false));
------------------------------------------------------------------------
Modified:
ofbiz/branches/release10.04/ (props changed)
ofbiz/branches/release10.04/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy
Propchange: ofbiz/branches/release10.04/
------------------------------------------------------------------------------
Merged /ofbiz/trunk:r1493393
Modified: ofbiz/branches/release10.04/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy?rev=1493394&r1=1493393&r2=1493394&view=diff==============================================================================
--- ofbiz/branches/release10.04/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy (original)
+++ ofbiz/branches/release10.04/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy Sat Jun 15 16:27:49 2013
@@ -21,6 +21,7 @@ import java.util.*;
import java.sql.Timestamp;
import org.ofbiz.entity.*;
import org.ofbiz.base.util.*;
+import org.ofbiz.entity.util.*;
module = "FindOrders.groovy";
@@ -82,7 +83,6 @@ if (currentWebSiteId) {
// current store
currentProductStoreId = request.getParameter("productStoreId");
if (currentProductStoreId) {
- currentProductStore = delegator.findByPrimaryKeyCache("ProductStore", [productStoreId : currentProductStoreId]);
context.currentProductStore = currentProductStore;
}
@@ -92,7 +92,7 @@ if (shipmentMethod) {
carrierPartyId = shipmentMethod.substring(0, shipmentMethod.indexOf("@"));
shipmentMethodTypeId = shipmentMethod.substring(shipmentMethod.indexOf("@")+1);
if (carrierPartyId && shipmentMethodTypeId) {
- currentCarrierShipmentMethod = delegator.findByAnd("CarrierShipmentMethod", [partyId : carrierPartyId, shipmentMethodTypeId : shipmentMethodTypeId]);
+ currentCarrierShipmentMethod = EntityUtil.getFirst(delegator.findByAnd("CarrierShipmentMethod", [partyId : carrierPartyId, shipmentMethodTypeId : shipmentMethodTypeId], null, false));
context.currentCarrierShipmentMethod = currentCarrierShipmentMethod;
}
}