Author: jleroux
Date: Sat Jun 15 16:22:53 2013
New Revision: 1493393
URL:
http://svn.apache.org/r1493393Log:
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/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy
Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy?rev=1493393&r1=1493392&r2=1493393&view=diff==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy Sat Jun 15 16:22:53 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";
@@ -100,7 +101,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], null, false);
+ currentCarrierShipmentMethod = EntityUtil.getFirst(delegator.findByAnd("CarrierShipmentMethod", [partyId : carrierPartyId, shipmentMethodTypeId : shipmentMethodTypeId], null, false));
context.currentCarrierShipmentMethod = currentCarrierShipmentMethod;
}
}