You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by er...@apache.org on 2012/06/19 23:36:33 UTC
svn commit: r1351866 [28/48] - in /ofbiz/branches/20120329_portletWidget: ./
applications/accounting/ applications/accounting/config/
applications/accounting/data/ applications/accounting/entitydef/
applications/accounting/script/org/ofbiz/accounting/i...
Modified: ofbiz/branches/20120329_portletWidget/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java Tue Jun 19 21:36:11 2012
@@ -144,12 +144,12 @@ public class UpsServices {
}
// Get Origin Info
- GenericValue originPostalAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress");
+ GenericValue originPostalAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress", false);
if (originPostalAddress == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentRouteSegmentOriginPostalAddressNotFound",
UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
}
- GenericValue originTelecomNumber = shipmentRouteSegment.getRelatedOne("OriginTelecomNumber");
+ GenericValue originTelecomNumber = shipmentRouteSegment.getRelatedOne("OriginTelecomNumber", false);
if (originTelecomNumber == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentRouteSegmentOriginTelecomNumberNotFound",
UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
@@ -162,20 +162,20 @@ public class UpsServices {
originPhoneNumber = StringUtil.replaceString(originPhoneNumber, "-", "");
originPhoneNumber = StringUtil.replaceString(originPhoneNumber, " ", "");
// lookup the two letter country code (in the geoCode field)
- GenericValue originCountryGeo = originPostalAddress.getRelatedOne("CountryGeo");
+ GenericValue originCountryGeo = originPostalAddress.getRelatedOne("CountryGeo", false);
if (originCountryGeo == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentRouteSegmentOriginCountryGeoNotFound",
UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
}
// Get Dest Info
- GenericValue destPostalAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress");
+ GenericValue destPostalAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress", false);
if (destPostalAddress == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentRouteSegmentDestPostalAddressNotFound",
UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
}
- GenericValue destTelecomNumber = shipmentRouteSegment.getRelatedOne("DestTelecomNumber");
+ GenericValue destTelecomNumber = shipmentRouteSegment.getRelatedOne("DestTelecomNumber", false);
if (destTelecomNumber == null) {
String missingErrMsg = "DestTelecomNumber not found for ShipmentRouteSegment with shipmentId " + shipmentId + " and shipmentRouteSegmentId " + shipmentRouteSegmentId;
Debug.logError(missingErrMsg, module);
@@ -194,7 +194,7 @@ public class UpsServices {
}
// lookup the two letter country code (in the geoCode field)
- GenericValue destCountryGeo = destPostalAddress.getRelatedOne("CountryGeo");
+ GenericValue destCountryGeo = destPostalAddress.getRelatedOne("CountryGeo", false);
if (destCountryGeo == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentRouteSegmentDestCountryGeoNotFound",
UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
@@ -207,13 +207,13 @@ public class UpsServices {
UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId, "carrierPartyId", shipmentRouteSegment.get("carrierPartyId"), "shipmentMethodTypeId", shipmentRouteSegment.get("shipmentMethodTypeId")), locale));
}
- List<GenericValue> shipmentPackageRouteSegs = shipmentRouteSegment.getRelated("ShipmentPackageRouteSeg", null, UtilMisc.toList("+shipmentPackageSeqId"));
+ List<GenericValue> shipmentPackageRouteSegs = shipmentRouteSegment.getRelated("ShipmentPackageRouteSeg", null, UtilMisc.toList("+shipmentPackageSeqId"), false);
if (UtilValidate.isEmpty(shipmentPackageRouteSegs)) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentPackageRouteSegsNotFound",
UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
}
- List<GenericValue> itemIssuances = shipment.getRelated("ItemIssuance");
+ List<GenericValue> itemIssuances = shipment.getRelated("ItemIssuance", null, null, false);
Set<String> orderIdSet = new TreeSet<String>();
for (GenericValue itemIssuance: itemIssuances) {
orderIdSet.add(itemIssuance.getString("orderId"));
@@ -462,15 +462,15 @@ public class UpsServices {
Element shipmentServiceOptionsElement = UtilXml.addChildElement(shipmentElement, "ShipmentServiceOptions", shipmentConfirmRequestDoc);
Element internationalFormsElement = UtilXml.addChildElement(shipmentServiceOptionsElement, "InternationalForms", shipmentConfirmRequestDoc);
UtilXml.addChildElementValue(internationalFormsElement, "FormType", "01", shipmentConfirmRequestDoc);
- List<GenericValue> shipmentItems = shipment.getRelated("ShipmentItem");
+ List<GenericValue> shipmentItems = shipment.getRelated("ShipmentItem", null, null, false);
for (GenericValue shipmentItem :shipmentItems) {
Element productElement = UtilXml.addChildElement(internationalFormsElement, "Product", shipmentConfirmRequestDoc);
UtilXml.addChildElementValue(productElement, "Description", "Product Description", shipmentConfirmRequestDoc);
Element unitElement = UtilXml.addChildElement(productElement, "Unit", shipmentConfirmRequestDoc);
BigDecimal productQuantity = shipmentItem.getBigDecimal("quantity").setScale(decimals, rounding);
UtilXml.addChildElementValue(unitElement, "Number", String.valueOf(productQuantity.intValue()), shipmentConfirmRequestDoc);
- List<GenericValue> shipmentItemIssuances = shipmentItem.getRelated("ItemIssuance");
- GenericValue orderItem = EntityUtil.getFirst(shipmentItemIssuances).getRelatedOne("OrderItem");
+ List<GenericValue> shipmentItemIssuances = shipmentItem.getRelated("ItemIssuance", null, null, false);
+ GenericValue orderItem = EntityUtil.getFirst(shipmentItemIssuances).getRelatedOne("OrderItem", false);
UtilXml.addChildElementValue(unitElement, "Value", orderItem.getBigDecimal("unitPrice").toString(), shipmentConfirmRequestDoc);
Element unitOfMeasurElement = UtilXml.addChildElement(unitElement, "UnitOfMeasurement", shipmentConfirmRequestDoc);
UtilXml.addChildElementValue(unitOfMeasurElement, "Code", "EA", shipmentConfirmRequestDoc);
@@ -487,9 +487,9 @@ public class UpsServices {
ListIterator<GenericValue> shipmentPackageRouteSegIter = shipmentPackageRouteSegs.listIterator();
while (shipmentPackageRouteSegIter.hasNext()) {
GenericValue shipmentPackageRouteSeg = shipmentPackageRouteSegIter.next();
- GenericValue shipmentPackage = shipmentPackageRouteSeg.getRelatedOne("ShipmentPackage");
- GenericValue shipmentBoxType = shipmentPackage.getRelatedOne("ShipmentBoxType");
- List<GenericValue> carrierShipmentBoxTypes = shipmentPackage.getRelated("CarrierShipmentBoxType", UtilMisc.toMap("partyId", "UPS"), null);
+ GenericValue shipmentPackage = shipmentPackageRouteSeg.getRelatedOne("ShipmentPackage", false);
+ GenericValue shipmentBoxType = shipmentPackage.getRelatedOne("ShipmentBoxType", false);
+ List<GenericValue> carrierShipmentBoxTypes = shipmentPackage.getRelated("CarrierShipmentBoxType", UtilMisc.toMap("partyId", "UPS"), null, false);
GenericValue carrierShipmentBoxType = null;
if (carrierShipmentBoxTypes.size() > 0) {
carrierShipmentBoxType = carrierShipmentBoxTypes.get(0);
@@ -506,7 +506,7 @@ public class UpsServices {
if (shipmentBoxType != null) {
Element dimensionsElement = UtilXml.addChildElement(packageElement, "Dimensions", shipmentConfirmRequestDoc);
Element unitOfMeasurementElement = UtilXml.addChildElement(dimensionsElement, "UnitOfMeasurement", shipmentConfirmRequestDoc);
- GenericValue dimensionUom = shipmentBoxType.getRelatedOne("DimensionUom");
+ GenericValue dimensionUom = shipmentBoxType.getRelatedOne("DimensionUom", false);
if (dimensionUom != null) {
UtilXml.addChildElementValue(unitOfMeasurementElement, "Code", dimensionUom.getString("abbreviation").toUpperCase(), shipmentConfirmRequestDoc);
} else {
@@ -524,7 +524,7 @@ public class UpsServices {
&& UtilValidate.isNotEmpty(shipmentPackage.getBigDecimal("boxHeight"))) {
Element dimensionsElement = UtilXml.addChildElement(packageElement, "Dimensions", shipmentConfirmRequestDoc);
Element unitOfMeasurementElement = UtilXml.addChildElement(dimensionsElement, "UnitOfMeasurement", shipmentConfirmRequestDoc);
- GenericValue dimensionUom = shipmentPackage.getRelatedOne("DimensionUom");
+ GenericValue dimensionUom = shipmentPackage.getRelatedOne("DimensionUom", false);
if (UtilValidate.isNotEmpty(dimensionUom)) {
UtilXml.addChildElementValue(unitOfMeasurementElement, "Code", dimensionUom.getString("abbreviation").toUpperCase(), shipmentConfirmRequestDoc);
} else {
@@ -859,7 +859,7 @@ public class UpsServices {
UtilMisc.toMap("shipmentRouteSegmentId", shipmentRouteSegmentId, "shipmentId", shipmentId, "shipmentRouteSegmentStatus", shipmentRouteSegment.getString("carrierServiceStatusId")), locale));
}
- List<GenericValue> shipmentPackageRouteSegs = shipmentRouteSegment.getRelated("ShipmentPackageRouteSeg", null, UtilMisc.toList("+shipmentPackageSeqId"));
+ List<GenericValue> shipmentPackageRouteSegs = shipmentRouteSegment.getRelated("ShipmentPackageRouteSeg", null, UtilMisc.toList("+shipmentPackageSeqId"), false);
if (UtilValidate.isEmpty(shipmentPackageRouteSegs)) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsPackageRouteSegsNotFound",
UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
@@ -1500,7 +1500,7 @@ public class UpsServices {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentStatusNotAccepted", UtilMisc.toMap("shipmentRouteSegmentId", shipmentRouteSegmentId, "shipmentId", shipmentId, "shipmentRouteSegmentStatus", shipmentRouteSegment.getString("carrierServiceStatusId")), locale));
}
- List<GenericValue> shipmentPackageRouteSegs = shipmentRouteSegment.getRelated("ShipmentPackageRouteSeg", null, UtilMisc.toList("+shipmentPackageSeqId"));
+ List<GenericValue> shipmentPackageRouteSegs = shipmentRouteSegment.getRelated("ShipmentPackageRouteSeg", null, UtilMisc.toList("+shipmentPackageSeqId"), false);
if (UtilValidate.isEmpty(shipmentPackageRouteSegs)) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsPackageRouteSegsNotFound", UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
}
@@ -1738,7 +1738,7 @@ public class UpsServices {
GenericValue destCountryGeo = null;
try {
- destCountryGeo = shipToAddress.getRelatedOne("CountryGeo");
+ destCountryGeo = shipToAddress.getRelatedOne("CountryGeo", false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
return ServiceUtil.returnError(e.getMessage());
@@ -2119,7 +2119,7 @@ public class UpsServices {
UtilXml.addChildElementValue(shipperAddrElement, "PostalCode", shipFromAddress.getString("postalCode"), rateRequestDoc);
try {
//If the warehouse you are shipping from its located in a country other than US, you need to supply its country code to UPS
- UtilXml.addChildElementValue(shipperAddrElement, "CountryCode", shipFromAddress.getRelatedOneCache("CountryGeo").getString("geoCode"), rateRequestDoc);
+ UtilXml.addChildElementValue(shipperAddrElement, "CountryCode", shipFromAddress.getRelatedOne("CountryGeo", true).getString("geoCode"), rateRequestDoc);
} catch (GenericEntityException e) {
return ServiceUtil.returnError(e.getMessage());
}
@@ -2426,12 +2426,12 @@ public class UpsServices {
}
// Get Origin Info
- GenericValue originPostalAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress");
+ GenericValue originPostalAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress", false);
if (originPostalAddress == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentOriginPostalAddressNotFound",
UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
}
- GenericValue originTelecomNumber = shipmentRouteSegment.getRelatedOne("OriginTelecomNumber");
+ GenericValue originTelecomNumber = shipmentRouteSegment.getRelatedOne("OriginTelecomNumber", false);
if (originTelecomNumber == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentOriginTelecomNumberNotFound",
UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
@@ -2444,20 +2444,20 @@ public class UpsServices {
originPhoneNumber = StringUtil.replaceString(originPhoneNumber, "-", "");
originPhoneNumber = StringUtil.replaceString(originPhoneNumber, " ", "");
// lookup the two letter country code (in the geoCode field)
- GenericValue originCountryGeo = originPostalAddress.getRelatedOne("CountryGeo");
+ GenericValue originCountryGeo = originPostalAddress.getRelatedOne("CountryGeo", false);
if (originCountryGeo == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentOriginCountryGeoNotFound",
UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
}
// Get Dest Info
- GenericValue destPostalAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress");
+ GenericValue destPostalAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress", false);
if (destPostalAddress == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentDestPostalAddressNotFound",
UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
}
- GenericValue destTelecomNumber = shipmentRouteSegment.getRelatedOne("DestTelecomNumber");
+ GenericValue destTelecomNumber = shipmentRouteSegment.getRelatedOne("DestTelecomNumber", false);
if (destTelecomNumber == null) {
String missingErrMsg = "DestTelecomNumber not found for ShipmentRouteSegment with shipmentId " + shipmentId + " and shipmentRouteSegmentId " + shipmentRouteSegmentId;
Debug.logError(missingErrMsg, module);
@@ -2474,7 +2474,7 @@ public class UpsServices {
}
// lookup the two letter country code (in the geoCode field)
- GenericValue destCountryGeo = destPostalAddress.getRelatedOne("CountryGeo");
+ GenericValue destCountryGeo = destPostalAddress.getRelatedOne("CountryGeo", false);
if (destCountryGeo == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentDestCountryGeoNotFound",
UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
@@ -2498,7 +2498,7 @@ public class UpsServices {
senderEmail = (String) originEmail.get("emailAddress");
}
- List<GenericValue> shipmentPackageRouteSegs = shipmentRouteSegment.getRelated("ShipmentPackageRouteSeg", null, UtilMisc.toList("+shipmentPackageSeqId"));
+ List<GenericValue> shipmentPackageRouteSegs = shipmentRouteSegment.getRelated("ShipmentPackageRouteSeg", null, UtilMisc.toList("+shipmentPackageSeqId"), false);
if (UtilValidate.isEmpty(shipmentPackageRouteSegs)) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsPackageRouteSegsNotFound",
UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
@@ -2814,12 +2814,12 @@ public class UpsServices {
}
// Get Origin Info
- GenericValue originPostalAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress");
+ GenericValue originPostalAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress", false);
if (originPostalAddress == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentOriginPostalAddressNotFound",
UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
}
- GenericValue originTelecomNumber = shipmentRouteSegment.getRelatedOne("OriginTelecomNumber");
+ GenericValue originTelecomNumber = shipmentRouteSegment.getRelatedOne("OriginTelecomNumber", false);
if (originTelecomNumber == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentOriginTelecomNumberNotFound",
UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
@@ -2832,20 +2832,20 @@ public class UpsServices {
originPhoneNumber = StringUtil.replaceString(originPhoneNumber, "-", "");
originPhoneNumber = StringUtil.replaceString(originPhoneNumber, " ", "");
// lookup the two letter country code (in the geoCode field)
- GenericValue originCountryGeo = originPostalAddress.getRelatedOne("CountryGeo");
+ GenericValue originCountryGeo = originPostalAddress.getRelatedOne("CountryGeo", false);
if (originCountryGeo == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentOriginCountryGeoNotFound",
UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
}
// Get Dest Info
- GenericValue destPostalAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress");
+ GenericValue destPostalAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress", false);
if (destPostalAddress == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentDestPostalAddressNotFound",
UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
}
- GenericValue destTelecomNumber = shipmentRouteSegment.getRelatedOne("DestTelecomNumber");
+ GenericValue destTelecomNumber = shipmentRouteSegment.getRelatedOne("DestTelecomNumber", false);
if (destTelecomNumber == null) {
String missingErrMsg = "DestTelecomNumber not found for ShipmentRouteSegment with shipmentId " + shipmentId + " and shipmentRouteSegmentId " + shipmentRouteSegmentId;
Debug.logError(missingErrMsg, module);
@@ -2864,7 +2864,7 @@ public class UpsServices {
}
// lookup the two letter country code (in the geoCode field)
- GenericValue destCountryGeo = destPostalAddress.getRelatedOne("CountryGeo");
+ GenericValue destCountryGeo = destPostalAddress.getRelatedOne("CountryGeo", false);
if (destCountryGeo == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsRouteSegmentDestCountryGeoNotFound",
UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
@@ -2959,16 +2959,16 @@ public class UpsServices {
UtilXml.addChildElementValue(shipFromAddressElement, "PostalCode", originPostalAddress.getString("postalCode"), rateRequestDoc);
UtilXml.addChildElementValue(shipFromAddressElement, "CountryCode", originCountryGeo.getString("geoCode"), rateRequestDoc);
- List<GenericValue> shipmentPackageRouteSegs = shipmentRouteSegment.getRelated("ShipmentPackageRouteSeg", null, UtilMisc.toList("+shipmentPackageSeqId"));
+ List<GenericValue> shipmentPackageRouteSegs = shipmentRouteSegment.getRelated("ShipmentPackageRouteSeg", null, UtilMisc.toList("+shipmentPackageSeqId"), false);
if (UtilValidate.isEmpty(shipmentPackageRouteSegs)) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError, "FacilityShipmentUpsPackageRouteSegsNotFound",
UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), locale));
}
for (GenericValue shipmentPackageRouteSeg :shipmentPackageRouteSegs) {
- GenericValue shipmentPackage = shipmentPackageRouteSeg.getRelatedOne("ShipmentPackage");
- GenericValue shipmentBoxType = shipmentPackage.getRelatedOne("ShipmentBoxType");
- List<GenericValue> carrierShipmentBoxTypes = shipmentPackage.getRelated("CarrierShipmentBoxType", UtilMisc.toMap("partyId", "UPS"), null);
+ GenericValue shipmentPackage = shipmentPackageRouteSeg.getRelatedOne("ShipmentPackage", false);
+ GenericValue shipmentBoxType = shipmentPackage.getRelatedOne("ShipmentBoxType", false);
+ List<GenericValue> carrierShipmentBoxTypes = shipmentPackage.getRelated("CarrierShipmentBoxType", UtilMisc.toMap("partyId", "UPS"), null, false);
GenericValue carrierShipmentBoxType = null;
if (carrierShipmentBoxTypes.size() > 0) {
carrierShipmentBoxType = carrierShipmentBoxTypes.get(0);
@@ -2985,7 +2985,7 @@ public class UpsServices {
if (shipmentBoxType != null) {
Element dimensionsElement = UtilXml.addChildElement(packageElement, "Dimensions", rateRequestDoc);
Element unitOfMeasurementElement = UtilXml.addChildElement(dimensionsElement, "UnitOfMeasurement", rateRequestDoc);
- GenericValue dimensionUom = shipmentBoxType.getRelatedOne("DimensionUom");
+ GenericValue dimensionUom = shipmentBoxType.getRelatedOne("DimensionUom", false);
if (dimensionUom != null) {
UtilXml.addChildElementValue(unitOfMeasurementElement, "Code", dimensionUom.getString("abbreviation").toUpperCase(), rateRequestDoc);
} else {
Modified: ofbiz/branches/20120329_portletWidget/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java Tue Jun 19 21:36:11 2012
@@ -298,7 +298,7 @@ public class UspsServices {
"FacilityShipmentUspsRateInternationCannotBeUsedForUsDestinations", locale));
}
if (shipToAddress != null && UtilValidate.isNotEmpty(shipToAddress.getString("countryGeoId"))) {
- GenericValue countryGeo = shipToAddress.getRelatedOne("CountryGeo");
+ GenericValue countryGeo = shipToAddress.getRelatedOne("CountryGeo", false);
// TODO: Test against all country geoNames against what USPS expects
destinationCountry = countryGeo.getString("geoName");
}
@@ -949,7 +949,7 @@ public class UspsServices {
}
// get the origin address
- GenericValue originAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress");
+ GenericValue originAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress", false);
if (originAddress == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
"FacilityShipmentRouteSegmentOriginPostalAddressNotFound",
@@ -968,7 +968,7 @@ public class UspsServices {
}
// get the destination address
- GenericValue destinationAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress");
+ GenericValue destinationAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress", false);
if (destinationAddress == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
"FacilityShipmentRouteSegmentDestPostalAddressNotFound",
@@ -1005,8 +1005,7 @@ public class UspsServices {
}
// get the packages for this shipment route segment
- List<GenericValue> shipmentPackageRouteSegList = shipmentRouteSegment.getRelated("ShipmentPackageRouteSeg", null,
- UtilMisc.toList("+shipmentPackageSeqId"));
+ List<GenericValue> shipmentPackageRouteSegList = shipmentRouteSegment.getRelated("ShipmentPackageRouteSeg", null, UtilMisc.toList("+shipmentPackageSeqId"), false);
if (UtilValidate.isEmpty(shipmentPackageRouteSegList)) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
"FacilityShipmentPackageRouteSegsNotFound",
@@ -1037,7 +1036,7 @@ public class UspsServices {
UtilXml.addChildElementValue(packageElement, "ZipDestination", destinationZip, requestDocument);
GenericValue shipmentPackage = null;
- shipmentPackage = shipmentPackageRouteSeg.getRelatedOne("ShipmentPackage");
+ shipmentPackage = shipmentPackageRouteSeg.getRelatedOne("ShipmentPackage", false);
// weight elements - Pounds, Ounces
String weightStr = shipmentPackage.getString("weight");
@@ -1092,8 +1091,7 @@ public class UspsServices {
// Container element
GenericValue carrierShipmentBoxType = null;
List<GenericValue> carrierShipmentBoxTypes = null;
- carrierShipmentBoxTypes = shipmentPackage.getRelated("CarrierShipmentBoxType",
- UtilMisc.toMap("partyId", "USPS"), null);
+ carrierShipmentBoxTypes = shipmentPackage.getRelated("CarrierShipmentBoxType", UtilMisc.toMap("partyId", "USPS"), null, false);
if (carrierShipmentBoxTypes.size() > 0) {
carrierShipmentBoxType = carrierShipmentBoxTypes.get(0);
@@ -1258,7 +1256,7 @@ public class UspsServices {
}
// get the origin address
- GenericValue originAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress");
+ GenericValue originAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress", false);
if (originAddress == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
"FacilityShipmentRouteSegmentOriginPostalAddressNotFound",
@@ -1271,7 +1269,7 @@ public class UspsServices {
}
// get the destination address
- GenericValue destinationAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress");
+ GenericValue destinationAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress", false);
if (destinationAddress == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
"FacilityShipmentRouteSegmentDestPostalAddressNotFound",
@@ -1301,8 +1299,7 @@ public class UspsServices {
}
// get the packages for this shipment route segment
- List<GenericValue> shipmentPackageRouteSegList = shipmentRouteSegment.getRelated("ShipmentPackageRouteSeg", null,
- UtilMisc.toList("+shipmentPackageSeqId"));
+ List<GenericValue> shipmentPackageRouteSegList = shipmentRouteSegment.getRelated("ShipmentPackageRouteSeg", null, UtilMisc.toList("+shipmentPackageSeqId"), false);
if (UtilValidate.isEmpty(shipmentPackageRouteSegList)) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
"FacilityShipmentPackageRouteSegsNotFound",
@@ -1346,7 +1343,7 @@ public class UspsServices {
UtilXml.addChildElementValue(requestElement, "ToZip5", destinationAddress.getString("postalCode"), requestDocument);
UtilXml.addChildElement(requestElement, "ToZip4", requestDocument);
- GenericValue shipmentPackage = shipmentPackageRouteSeg.getRelatedOne("ShipmentPackage");
+ GenericValue shipmentPackage = shipmentPackageRouteSeg.getRelatedOne("ShipmentPackage", false);
// WeightInOunces
String weightStr = shipmentPackage.getString("weight");
@@ -1448,8 +1445,7 @@ public class UspsServices {
GenericValue shipmentRouteSegment = delegator.findOne("ShipmentRouteSegment",
UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), false);
- List<GenericValue> shipmentPackageRouteSegList = shipmentRouteSegment.getRelated("ShipmentPackageRouteSeg", null,
- UtilMisc.toList("+shipmentPackageSeqId"));
+ List<GenericValue> shipmentPackageRouteSegList = shipmentRouteSegment.getRelated("ShipmentPackageRouteSeg", null, UtilMisc.toList("+shipmentPackageSeqId"), false);
for (GenericValue shipmentPackageRouteSeg: shipmentPackageRouteSegList) {
byte[] labelImageBytes = shipmentPackageRouteSeg.getBytes("labelImage");
@@ -1503,15 +1499,15 @@ public class UspsServices {
GenericValue destinationTelecomNumber = null;
List<GenericValue> shipmentPackageRouteSegs = null;
try {
- originAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress");
- originTelecomNumber = shipmentRouteSegment.getRelatedOne("OriginTelecomNumber");
- destinationAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress");
+ originAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress", false);
+ originTelecomNumber = shipmentRouteSegment.getRelatedOne("OriginTelecomNumber", false);
+ destinationAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress", false);
if (destinationAddress != null) {
- destinationProvince = destinationAddress.getRelatedOne("StateProvinceGeo");
- destinationCountry = destinationAddress.getRelatedOne("CountryGeo");
+ destinationProvince = destinationAddress.getRelatedOne("StateProvinceGeo", false);
+ destinationCountry = destinationAddress.getRelatedOne("CountryGeo", false);
}
- destinationTelecomNumber = shipmentRouteSegment.getRelatedOne("DestTelecomNumber");
- shipmentPackageRouteSegs = shipmentRouteSegment.getRelated("ShipmentPackageRouteSeg");
+ destinationTelecomNumber = shipmentRouteSegment.getRelatedOne("DestTelecomNumber", false);
+ shipmentPackageRouteSegs = shipmentRouteSegment.getRelated("ShipmentPackageRouteSeg", null, null, false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
}
@@ -1574,11 +1570,11 @@ public class UspsServices {
GenericValue shipmentPackage = null;
List<GenericValue> shipmentPackageContents = null;
try {
- shipmentPackage = shipmentPackageRouteSeg.getRelatedOne("ShipmentPackage");
- shipmentPackageContents = shipmentPackage.getRelated("ShipmentPackageContent");
- GenericValue shipmentBoxType = shipmentPackage.getRelatedOne("ShipmentBoxType");
+ shipmentPackage = shipmentPackageRouteSeg.getRelatedOne("ShipmentPackage", false);
+ shipmentPackageContents = shipmentPackage.getRelated("ShipmentPackageContent", null, null, false);
+ GenericValue shipmentBoxType = shipmentPackage.getRelatedOne("ShipmentBoxType", false);
if (shipmentBoxType != null) {
- GenericValue carrierShipmentBoxType = EntityUtil.getFirst(shipmentBoxType.getRelatedByAnd("CarrierShipmentBoxType", UtilMisc.toMap("partyId", "USPS")));
+ GenericValue carrierShipmentBoxType = EntityUtil.getFirst(shipmentBoxType.getRelated("CarrierShipmentBoxType", UtilMisc.toMap("partyId", "USPS"), null, false));
if (carrierShipmentBoxType != null) {
packageTypeCode = carrierShipmentBoxType.getString("packageTypeCode");
// Supported type codes
@@ -1626,9 +1622,9 @@ public class UspsServices {
GenericValue product = null;
GenericValue originGeo = null;
try {
- GenericValue shipmentItem = shipmentPackageContent.getRelatedOne("ShipmentItem");
- product = shipmentItem.getRelatedOne("Product");
- originGeo = product.getRelatedOne("OriginGeo");
+ GenericValue shipmentItem = shipmentPackageContent.getRelatedOne("ShipmentItem", false);
+ product = shipmentItem.getRelatedOne("Product", false);
+ originGeo = product.getRelatedOne("OriginGeo", false);
} catch (GenericEntityException e) {
Debug.logInfo(e, module);
}
Modified: ofbiz/branches/20120329_portletWidget/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java Tue Jun 19 21:36:11 2012
@@ -112,7 +112,7 @@ public class VerifyPickSession implement
for (GenericValue reservation : reservations) {
if (qtyRemain.compareTo(ZERO) > 0) {
- if (!productId.equals(reservation.getRelatedOne("InventoryItem").getString("productId"))) {
+ if (!productId.equals(reservation.getRelatedOne("InventoryItem", false).getString("productId"))) {
continue;
}
BigDecimal reservedQty = reservation.getBigDecimal("quantity");
Modified: ofbiz/branches/20120329_portletWidget/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSession.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSession.java?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSession.java (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSession.java Tue Jun 19 21:36:11 2012
@@ -440,7 +440,7 @@ public class WeightPackageSession implem
}
List<GenericValue> orderItems = this.getDelegator().findByAnd("OrderItem", UtilMisc.toMap("orderId", orderId, "statusId", "ITEM_APPROVED"), null, false);
for (GenericValue orderItem : orderItems) {
- List<GenericValue> orderItemShipGrpInvReserves = orderItem.getRelated("OrderItemShipGrpInvRes");
+ List<GenericValue> orderItemShipGrpInvReserves = orderItem.getRelated("OrderItemShipGrpInvRes", null, null, false);
if (UtilValidate.isEmpty(orderItemShipGrpInvReserves)) {
Map<String, Object> orderItemStatusMap = FastMap.newInstance();
orderItemStatusMap.put("orderId", orderId);
Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy Tue Jun 19 21:36:11 2012
@@ -34,7 +34,7 @@ List separateRootType(roots) {
prodRootTypeTree = [];
roots.each { root ->
prodCateMap = [:];
- productCategory = root.getRelatedOne("ProductCategory");
+ productCategory = root.getRelatedOne("ProductCategory", false);
prodCateMap.productCategoryId = productCategory.getString("productCategoryId");
prodCateMap.categoryName = productCategory.getString("categoryName");
prodCateMap.isCatalog = false;
Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategory.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategory.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategory.groovy (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategory.groovy Tue Jun 19 21:36:11 2012
@@ -21,13 +21,13 @@ import org.ofbiz.base.util.*
import org.ofbiz.base.util.string.*
if (productCategory) {
- context.productCategoryType = productCategory.getRelatedOne("ProductCategoryType");
+ context.productCategoryType = productCategory.getRelatedOne("ProductCategoryType", false);
}
primaryParentCategory = null;
primParentCatIdParam = request.getParameter("primaryParentCategoryId");
if (productCategory) {
- primaryParentCategory = productCategory.getRelatedOne("PrimaryParentProductCategory");
+ primaryParentCategory = productCategory.getRelatedOne("PrimaryParentProductCategory", false);
} else if (primParentCatIdParam) {
primaryParentCategory = delegator.findOne("ProductCategory", [productCategoryId : primParentCatIdParam], false);
}
Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContent.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContent.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContent.groovy (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContent.groovy Tue Jun 19 21:36:11 2012
@@ -36,13 +36,13 @@ context.imageNameSmall = imageUrlPrefix
// Start ProdConfItemContent stuff
productContent = null;
if (configItem) {
- productContent = configItem.getRelated("ProdConfItemContent", null, ['confItemContentTypeId']);
+ productContent = configItem.getRelated("ProdConfItemContent", null, ['confItemContentTypeId'], false);
}
context.productContent = productContent;
productContentDatas = [];
productContent.each { productContent ->
- content = productContent.getRelatedOne("Content");
+ content = productContent.getRelatedOne("Content", false);
productContentDatas.add([productContent : productContent, content : content]);
}
Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContentContent.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContentContent.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContentContent.groovy (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContentContent.groovy Tue Jun 19 21:36:11 2012
@@ -57,9 +57,9 @@ if (contentId) {
//Assume it is a generic simple text content
textData = [:];
if (contentId && content) {
- textDr = content.getRelatedOne("DataResource");
+ textDr = content.getRelatedOne("DataResource", false);
if (textDr) {
- text = textDr.getRelatedOne("ElectronicText");
+ text = textDr.getRelatedOne("ElectronicText", false);
if (text) {
textData.text = text.textData;
textData.textDataResourceId = text.dataResourceId;
Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageUpload.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageUpload.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageUpload.groovy (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageUpload.groovy Tue Jun 19 21:36:11 2012
@@ -43,7 +43,7 @@ context.imageNameOriginal = imageUrlPref
// Start ProductContent stuff
productContent = null;
if (product) {
- productContent = product.getRelated('ProductContent', null, ['productContentTypeId']);
+ productContent = product.getRelated('ProductContent', null, ['productContentTypeId'], false);
}
context.productContent = productContent;
// End ProductContent stuff
Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/SetDefaultImage.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/SetDefaultImage.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/SetDefaultImage.groovy (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/SetDefaultImage.groovy Tue Jun 19 21:36:11 2012
@@ -65,7 +65,7 @@ if (productId) {
productContent = null;
if (product) {
- productContent = product.getRelated('ProductContent', null, ['productContentTypeId']);
+ productContent = product.getRelated('ProductContent', null, ['productContentTypeId'], false);
}
context.productContent = productContent;
// End ProductContent stuff
Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/price/EditProductPriceRules.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/price/EditProductPriceRules.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/price/EditProductPriceRules.groovy (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/price/EditProductPriceRules.groovy Tue Jun 19 21:36:11 2012
@@ -34,10 +34,8 @@ if (!priceRuleId) {
if (priceRuleId) {
productPriceRules = [];
productPriceRules.add(delegator.findOne("ProductPriceRule", [productPriceRuleId : priceRuleId], false));
- productPriceConds = productPriceRules[0].getRelatedCache("ProductPriceCond");
- productPriceConds = EntityUtil.orderBy(productPriceConds, UtilMisc.toList("productPriceCondSeqId"));
- productPriceActions = productPriceRules[0].getRelatedCache("ProductPriceAction");
- productPriceActions = EntityUtil.orderBy(productPriceActions, UtilMisc.toList("productPriceActionSeqId"));
+ productPriceConds = productPriceRules[0].getRelated("ProductPriceCond", null, ["productPriceCondSeqId"], true);
+ productPriceActions = productPriceRules[0].getRelated("ProductPriceAction", null, ["productPriceActionSeqId"], true);
productPriceCondAdd = [];
productPriceCondAdd.add(delegator.makeValue("ProductPriceCond"));
Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromGroup.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromGroup.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromGroup.groovy (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromGroup.groovy Tue Jun 19 21:36:11 2012
@@ -28,10 +28,10 @@ productFeatureGroupId = parameters.get("
if (productFeatureGroupId) {
productFeatureGroup = delegator.findOne("ProductFeatureGroup", [productFeatureGroupId : productFeatureGroupId], false);
productFeatures = [];
- productFeatureGroupAppls = productFeatureGroup.getRelated("ProductFeatureGroupAppl", ['sequenceNum']);
+ productFeatureGroupAppls = productFeatureGroup.getRelated("ProductFeatureGroupAppl", null, ['sequenceNum'], false);
for (pFGAi = productFeatureGroupAppls.iterator(); pFGAi;) {
productFeatureGroupAppl = (GenericEntity)pFGAi.next();
- productFeature = (GenericEntity)productFeatureGroupAppl.getRelatedOne("ProductFeature");
+ productFeature = (GenericEntity)productFeatureGroupAppl.getRelatedOne("ProductFeature", false);
productFeature.set("defaultSequenceNum", productFeatureGroupAppl.getLong("sequenceNum"));
productFeatures.add(productFeature);
}
Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductAssoc.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductAssoc.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductAssoc.groovy (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductAssoc.groovy Tue Jun 19 21:36:11 2012
@@ -82,7 +82,7 @@ assocTypes = delegator.findList("Product
context.assocTypes = assocTypes;
if (product) {
- context.assocFromProducts = product.getRelated("MainProductAssoc", null, ['sequenceNum']);
+ context.assocFromProducts = product.getRelated("MainProductAssoc", null, ['sequenceNum'], false);
- context.assocToProducts = product.getRelated("AssocProductAssoc");
+ context.assocToProducts = product.getRelated("AssocProductAssoc", null, null, false);
}
Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductContent.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductContent.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductContent.groovy (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductContent.groovy Tue Jun 19 21:36:11 2012
@@ -42,7 +42,7 @@ context.imageNameOriginal = imageUrlPref
// Start ProductContent stuff
productContent = null;
if (product) {
- productContent = product.getRelated('ProductContent', null, ['productContentTypeId']);
+ productContent = product.getRelated('ProductContent', null, ['productContentTypeId'], false);
}
context.productContent = productContent;
// End ProductContent stuff
Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductContentContent.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductContentContent.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductContentContent.groovy (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductContentContent.groovy Tue Jun 19 21:36:11 2012
@@ -78,9 +78,9 @@ if (contentId) {
if ("FULFILLMENT_EMAIL".equals(productContentTypeId)) {
emailData = [:];
if (contentId && content) {
- subjectDr = content.getRelatedOne("DataResource");
+ subjectDr = content.getRelatedOne("DataResource", false);
if (subjectDr) {
- subject = subjectDr.getRelatedOne("ElectronicText");
+ subject = subjectDr.getRelatedOne("ElectronicText", false);
emailData.subject = subject.textData;
emailData.subjectDataResourceId = subject.dataResourceId;
}
@@ -89,9 +89,9 @@ if ("FULFILLMENT_EMAIL".equals(productCo
contentAssocs = result.get("contentAssocs");
if (contentAssocs) {
contentAssocs.each { contentAssoc ->
- bodyContent = contentAssoc.getRelatedOne("ToContent");
- bodyDr = bodyContent.getRelatedOne("DataResource");
- body = bodyDr.getRelatedOne("ElectronicText");
+ bodyContent = contentAssoc.getRelatedOne("ToContent", false);
+ bodyDr = bodyContent.getRelatedOne("DataResource", false);
+ body = bodyDr.getRelatedOne("ElectronicText", false);
emailData.put(contentAssoc.mapKey, body.textData);
emailData.put(contentAssoc.get("mapKey")+"DataResourceId", body.dataResourceId);
}
@@ -103,9 +103,9 @@ if ("FULFILLMENT_EMAIL".equals(productCo
} else if ("DIGITAL_DOWNLOAD".equals(productContentTypeId)) {
downloadData = [:];
if (contentId && content) {
- downloadDr = content.getRelatedOne("DataResource");
+ downloadDr = content.getRelatedOne("DataResource", false);
if (downloadDr) {
- download = downloadDr.getRelatedOne("OtherDataResource");
+ download = downloadDr.getRelatedOne("OtherDataResource", false);
if (download) {
downloadData.file = download.dataResourceContent;
downloadData.fileDataResourceId = download.dataResourceId;
@@ -122,9 +122,9 @@ if ("FULFILLMENT_EMAIL".equals(productCo
//Assume it is a generic simple text content
textData = [:];
if (contentId && content) {
- textDr = content.getRelatedOne("DataResource");
+ textDr = content.getRelatedOne("DataResource", false);
if (textDr) {
- text = textDr.getRelatedOne("ElectronicText");
+ text = textDr.getRelatedOne("ElectronicText", false);
if (text) {
textData.text = text.textData;
textData.textDataResourceId = text.dataResourceId;
Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductQuickAdmin.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductQuickAdmin.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductQuickAdmin.groovy (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductQuickAdmin.groovy Tue Jun 19 21:36:11 2012
@@ -65,7 +65,7 @@ if (removeFeatureTypeId) {
Iterator iter = addedFeatureTypes.values().iterator();
while (iter) {
GenericValue featureType = (GenericValue)iter.next();
- featuresByType.put(featureType.productFeatureTypeId, featureType.getRelated("ProductFeature", ['description']));
+ featuresByType.put(featureType.productFeatureTypeId, featureType.getRelated("ProductFeature", null, ['description'], false));
}
context.addedFeatureTypeIds = addedFeatureTypes.keySet();
@@ -111,12 +111,12 @@ if (product) {
EntityCondition.makeCondition(EntityCondition.makeCondition("showInSelect", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("showInSelect", EntityOperator.NOT_EQUAL, "N")),
null, ['description'], null, false);
- categoryMembers = product.getRelated("ProductCategoryMember");
+ categoryMembers = product.getRelated("ProductCategoryMember", null, null, false);
categoryMembers = EntityUtil.filterByDate(categoryMembers);
context.allCategories = allCategories;
context.productCategoryMembers = categoryMembers;
- productFeatureAndAppls = product.getRelated("ProductFeatureAndAppl");
+ productFeatureAndAppls = product.getRelated("ProductFeatureAndAppl", null, null, false);
// get standard features for this product
standardFeatureAppls = EntityUtil.filterByAnd(productFeatureAndAppls, [productFeatureApplTypeId : "STANDARD_FEATURE"]);
@@ -125,7 +125,7 @@ if (product) {
Iterator standardFeatureApplIter = standardFeatureAppls.iterator();
while (standardFeatureApplIter) {
GenericValue standardFeatureAndAppl = (GenericValue) standardFeatureApplIter.next();
- GenericValue featureType = standardFeatureAndAppl.getRelatedOneCache("ProductFeatureType");
+ GenericValue featureType = standardFeatureAndAppl.getRelatedOne("ProductFeatureType", true);
productFeatureTypeLookup.put(standardFeatureAndAppl.getString("productFeatureId"), featureType);
standardFeatureLookup.put(standardFeatureAndAppl.getString("productFeatureId"), standardFeatureAndAppl);
}
@@ -141,7 +141,7 @@ if (product) {
Iterator selectableFeatureAndApplIter = selectableFeatureAppls.iterator();
while (selectableFeatureAndApplIter) {
GenericValue selectableFeatureAndAppl = (GenericValue) selectableFeatureAndApplIter.next();
- GenericValue featureType = selectableFeatureAndAppl.getRelatedOneCache("ProductFeatureType");
+ GenericValue featureType = selectableFeatureAndAppl.getRelatedOne("ProductFeatureType", true);
productFeatureTypeLookup.put(selectableFeatureAndAppl.productFeatureId, featureType);
selectableFeatureLookup.put(selectableFeatureAndAppl.productFeatureId, selectableFeatureAndAppl);
selectableFeatureTypes.add(featureType);
@@ -156,7 +156,7 @@ if (product) {
Iterator distinguishingFeatureIter = distinguishingFeatures.iterator();
while (distinguishingFeatureIter) {
distFeature = (GenericValue) distinguishingFeatureIter.next();
- featureType = distFeature.getRelatedOneCache("ProductFeatureType");
+ featureType = distFeature.getRelatedOne("ProductFeatureType", true);
if (!productFeatureTypeLookup.containsKey(distFeature.productFeatureId)) {
productFeatureTypeLookup.put(distFeature.productFeatureId, featureType);
}
@@ -227,16 +227,16 @@ if (product) {
context.thrudate = thrudate;
// get all variants - associations first
- productAssocs = product.getRelatedByAnd("MainProductAssoc", [productAssocTypeId : 'PRODUCT_VARIANT']);
+ productAssocs = product.getRelated("MainProductAssoc", [productAssocTypeId : 'PRODUCT_VARIANT'], null, false);
Iterator productAssocIter = productAssocs.iterator();
// get shipping dimensions and weights for all the variants
while (productAssocIter) {
// now get the variant product
productAssoc = (GenericValue)productAssocIter.next();
- assocProduct = productAssoc.getRelatedOne("AssocProduct");
+ assocProduct = productAssoc.getRelatedOne("AssocProduct", false);
if (assocProduct) {
assocProducts.add(assocProduct);
- assocProductFeatureAndAppls = assocProduct.getRelated("ProductFeatureAndAppl");
+ assocProductFeatureAndAppls = assocProduct.getRelated("ProductFeatureAndAppl", null, null, false);
prodFeaturesFiltered = EntityUtil.filterByAnd(assocProductFeatureAndAppls, [productFeatureTypeId : 'AMOUNT', uomId : 'VLIQ_ozUS']);
if (prodFeaturesFiltered) {
featureFloz.put(assocProduct.productId, ((GenericValue)prodFeaturesFiltered.get(0)).getBigDecimal("numberSpecified"));
Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/promo/EditProductPromoCode.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/promo/EditProductPromoCode.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/promo/EditProductPromoCode.groovy (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/WEB-INF/actions/promo/EditProductPromoCode.groovy Tue Jun 19 21:36:11 2012
@@ -38,8 +38,8 @@ if (productPromoId) {
productPromoCodeEmails = null;
productPromoCodeParties = null;
if (productPromoCode) {
- productPromoCodeEmails = productPromoCode.getRelated("ProductPromoCodeEmail");
- productPromoCodeParties = productPromoCode.getRelated("ProductPromoCodeParty");
+ productPromoCodeEmails = productPromoCode.getRelated("ProductPromoCodeEmail", null, null, false);
+ productPromoCodeParties = productPromoCode.getRelated("ProductPromoCodeParty", null, null, false);
}
context.productPromoId = productPromoId;
Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/category/EditCategoryFeatureCats.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/category/EditCategoryFeatureCats.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/category/EditCategoryFeatureCats.ftl (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/category/EditCategoryFeatureCats.ftl Tue Jun 19 21:36:11 2012
@@ -39,7 +39,7 @@ under the License.
<#assign rowClass = "2">
<#list productFeatureCatGrpAppls as productFeatureCatGrpAppl>
<#assign line = line + 1>
- <#assign productFeatureGroup = (productFeatureCatGrpAppl.getRelatedOne("ProductFeatureGroup"))?default(null)>
+ <#assign productFeatureGroup = (productFeatureCatGrpAppl.getRelatedOne("ProductFeatureGroup", false))?default(null)>
<tr valign="middle"<#if rowClass == "1"> class="alternate-row"</#if>>
<td><a href="<@o...@ofbizUrl>" class="buttontext"><#if productFeatureGroup?exists>${(productFeatureGroup.description)?if_exists}</#if> [${(productFeatureCatGrpAppl.productFeatureGroupId)?if_exists}]</a></td>
<#assign hasntStarted = false>
@@ -118,7 +118,7 @@ under the License.
<#assign rowClass = "2">
<#list productFeatureCategoryAppls as productFeatureCategoryAppl>
<#assign line = line + 1>
- <#assign productFeatureCategory = (productFeatureCategoryAppl.getRelatedOne("ProductFeatureCategory"))?default(null)>
+ <#assign productFeatureCategory = (productFeatureCategoryAppl.getRelatedOne("ProductFeatureCategory", false))?default(null)>
<tr valign="middle"<#if rowClass == "1"> class="alternate-row"</#if>>
<td><a href="<@o...@ofbizUrl>" class="buttontext"><#if productFeatureCategory?exists>${(productFeatureCategory.description)?if_exists}</#if> [${(productFeatureCategoryAppl.productFeatureCategoryId)?if_exists}]</a></td>
<#assign hasntStarted = false>
Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/category/EditCategoryParties.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/category/EditCategoryParties.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/category/EditCategoryParties.ftl (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/category/EditCategoryParties.ftl Tue Jun 19 21:36:11 2012
@@ -35,7 +35,7 @@ under the License.
<#assign rowClass = "2">
<#list productCategoryRoles as productCategoryRole>
<#assign line = line + 1>
- <#assign curRoleType = productCategoryRole.getRelatedOneCache("RoleType")>
+ <#assign curRoleType = productCategoryRole.getRelatedOne("RoleType", true)>
<tr valign="middle"<#if rowClass == "1"> class="alternate-row"</#if>>
<td><a href="/partymgr/control/viewprofile?party_id=${(productCategoryRole.partyId)?if_exists}" target="_blank" class="buttontext">${(productCategoryRole.partyId)?if_exists}</a></td>
<td>${(curRoleType.get("description",locale))?if_exists}</td>
Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/category/EditCategoryProdCatalogs.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/category/EditCategoryProdCatalogs.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/category/EditCategoryProdCatalogs.ftl (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/category/EditCategoryProdCatalogs.ftl Tue Jun 19 21:36:11 2012
@@ -35,8 +35,8 @@ under the License.
<#assign rowClass = "2">
<#list prodCatalogCategories as prodCatalogCategory>
<#assign line = line + 1>
- <#assign prodCatalog = prodCatalogCategory.getRelatedOne("ProdCatalog")>
- <#assign curProdCatalogCategoryType = prodCatalogCategory.getRelatedOneCache("ProdCatalogCategoryType")>
+ <#assign prodCatalog = prodCatalogCategory.getRelatedOne("ProdCatalog", false)>
+ <#assign curProdCatalogCategoryType = prodCatalogCategory.getRelatedOne("ProdCatalogCategoryType", true)>
<tr valign="middle"<#if rowClass == "1"> class="alternate-row"</#if>>
<td><a href="<@o...@ofbizUrl>" class="buttontext"><#if prodCatalog?exists>${(prodCatalog.catalogName)?if_exists}</#if> [${(prodCatalogCategory.prodCatalogId)?if_exists}]</a></td>
<td>
Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/category/EditCategoryProducts.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/category/EditCategoryProducts.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/category/EditCategoryProducts.ftl (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/category/EditCategoryProducts.ftl Tue Jun 19 21:36:11 2012
@@ -67,7 +67,7 @@ under the License.
<#assign rowCount = 0>
<#list productCategoryMembers as productCategoryMember>
<#assign suffix = "_o_" + productCategoryMember_index>
- <#assign product = productCategoryMember.getRelatedOne("Product")>
+ <#assign product = productCategoryMember.getRelatedOne("Product", false)>
<#assign hasntStarted = false>
<#if productCategoryMember.fromDate?exists && nowTimestamp.before(productCategoryMember.getTimestamp("fromDate"))><#assign hasntStarted = true></#if>
<#assign hasExpired = false>
Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/category/EditCategoryRollup.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/category/EditCategoryRollup.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/category/EditCategoryRollup.ftl (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/category/EditCategoryRollup.ftl Tue Jun 19 21:36:11 2012
@@ -48,7 +48,7 @@ under the License.
<#assign rowClass = "2">
<#list currentProductCategoryRollups as productCategoryRollup>
<#assign suffix = "_o_" + productCategoryRollup_index>
- <#assign curCategory = productCategoryRollup.getRelatedOne("ParentProductCategory")>
+ <#assign curCategory = productCategoryRollup.getRelatedOne("ParentProductCategory", false)>
<#assign hasntStarted = false>
<#if productCategoryRollup.fromDate?exists && nowTimestamp.before(productCategoryRollup.getTimestamp("fromDate"))><#assign hasntStarted = true></#if>
<#assign hasExpired = false>
@@ -156,7 +156,7 @@ under the License.
<#list parentProductCategoryRollups as productCategoryRollup>
<#assign suffix = "_o_" + lineChild>
<#assign lineChild = lineChild + 1>
- <#assign curCategory = productCategoryRollup.getRelatedOne("CurrentProductCategory")>
+ <#assign curCategory = productCategoryRollup.getRelatedOne("CurrentProductCategory", false)>
<#assign hasntStarted = false>
<#if productCategoryRollup.fromDate?exists && nowTimestamp.before(productCategoryRollup.getTimestamp("fromDate"))><#assign hasntStarted = true></#if>
<#assign hasExpired = false>
Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/config/EditProductConfigItemContent.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/config/EditProductConfigItemContent.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/config/EditProductConfigItemContent.ftl (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/config/EditProductConfigItemContent.ftl Tue Jun 19 21:36:11 2012
@@ -53,7 +53,7 @@ function insertImageName(size,nameValue)
<#assign rowClass = "2">
<#list productContentList as entry>
<#assign productContent=entry.productContent/>
- <#assign productContentType=productContent.getRelatedOneCache("ProdConfItemContentType")/>
+ <#assign productContentType=productContent.getRelatedOne("ProdConfItemContentType", true)/>
<tr valign="middle"<#if rowClass == "1"> class="alternate-row"</#if>>
<td><a href="<@o...@ofbizUrl>" class="buttontext">${entry.content.description?default("[${uiLabelMap.ProductNoDescription}]")} [${entry.content.contentId}]</td>
<td>${productContentType.description?default(productContent.confItemContentTypeId)}</td>
Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/feature/EditFeatureCategoryFeatures.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/feature/EditFeatureCategoryFeatures.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/feature/EditFeatureCategoryFeatures.ftl (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/feature/EditFeatureCategoryFeatures.ftl Tue Jun 19 21:36:11 2012
@@ -87,7 +87,7 @@ under the License.
<#assign rowCount = 0>
<#assign rowClass = "2">
<#list productFeatures as productFeature>
- <#assign curProductFeatureType = productFeature.getRelatedOneCache("ProductFeatureType")>
+ <#assign curProductFeatureType = productFeature.getRelatedOne("ProductFeatureType", true)>
<tr id="productFeatureId_tableRow_${rowCount}" valign="middle"<#if rowClass == "1"> class="alternate-row"</#if>>
<td><input type="hidden" name="productFeatureId_o_${rowCount}" value="${productFeature.productFeatureId}" />
<a href="<@o...@ofbizUrl>" class="buttontext">${productFeature.productFeatureId}</a></td>
@@ -103,7 +103,7 @@ under the License.
</select></td>
<td><select name='productFeatureCategoryId_o_${rowCount}' size="1">
<#if productFeature.productFeatureCategoryId?has_content>
- <#assign curProdFeatCat = productFeature.getRelatedOne("ProductFeatureCategory")>
+ <#assign curProdFeatCat = productFeature.getRelatedOne("ProductFeatureCategory", false)>
<option value='${productFeature.productFeatureCategoryId}'>${(curProdFeatCat.description)?if_exists} [${productFeature.productFeatureCategoryId}]</option>
<option value='${productFeature.productFeatureCategoryId}'>---</option>
</#if>
Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/find/FindProductById.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/find/FindProductById.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/find/FindProductById.ftl (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/find/FindProductById.ftl Tue Jun 19 21:36:11 2012
@@ -53,8 +53,8 @@ under the License.
<#else>
<#assign rowClass = "2">
</#if>
- <#assign product = goodIdentification.getRelatedOneCache("Product")/>
- <#assign goodIdentificationType = goodIdentification.getRelatedOneCache("GoodIdentificationType")/>
+ <#assign product = goodIdentification.getRelatedOne("Product", true)/>
+ <#assign goodIdentificationType = goodIdentification.getRelatedOne("GoodIdentificationType", true)/>
<tr valign="middle"<#if rowClass == "1"> class="alternate-row"</#if>>
<td>
${product.productId}
Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/find/miniproductlist.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/find/miniproductlist.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/find/miniproductlist.ftl (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/find/miniproductlist.ftl Tue Jun 19 21:36:11 2012
@@ -20,7 +20,7 @@ under the License.
<#if productCategory?exists>
<#if productCategoryMembers?has_content>
<#list productCategoryMembers as productCategoryMember>
- <#assign product = productCategoryMember.getRelatedOneCache("Product")>
+ <#assign product = productCategoryMember.getRelatedOne("Product", true)>
<div>
<a href='<@o...@ofbizUrl>' class='buttontext'>
<#if product.internalName?has_content>
Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/find/sidecatalogs.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/find/sidecatalogs.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/find/sidecatalogs.ftl (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/find/sidecatalogs.ftl Tue Jun 19 21:36:11 2012
@@ -21,11 +21,11 @@ under the License.
<#assign sortList = Static["org.ofbiz.base.util.UtilMisc"].toList("prodCatalogCategoryTypeId", "sequenceNum", "productCategoryId")>
<#list prodCatalogs as prodCatalog>
<#if curProdCatalogId?exists && curProdCatalogId == prodCatalog.prodCatalogId>
- <#assign prodCatalogCategories = prodCatalog.getRelatedOrderByCache("ProdCatalogCategory", sortList)>
+ <#assign prodCatalogCategories = prodCatalog.getRelated("ProdCatalogCategory", null, sortList, true)>
<div class='browsecategorytext'><a href="<@o...@ofbizUrl>" class='browsecategorybutton'>${prodCatalog.catalogName?if_exists}</a></div>
<div class="browsecategorylist">
<#list prodCatalogCategories as prodCatalogCategory>
- <#assign productCategory = prodCatalogCategory.getRelatedOneCache("ProductCategory")>
+ <#assign productCategory = prodCatalogCategory.getRelatedOne("ProductCategory", true)>
<div class='browsecategorytext'><a href='<@o...@ofbizUrl>' class="browsecategorybutton">${(productCategory.categoryName)?default(productCategory.description)?default(productCategory.productCategoryId)}</a></div>
</#list>
</div>
Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/imagemanagement/showPeopleApprove.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/imagemanagement/showPeopleApprove.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/imagemanagement/showPeopleApprove.ftl (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/imagemanagement/showPeopleApprove.ftl Tue Jun 19 21:36:11 2012
@@ -41,7 +41,7 @@ jQuery(document).ready(function(){
<#assign userLoginApprovers = delegator.findByAnd("UserLogin",Static["org.ofbiz.base.util.UtilMisc"].toMap("partyId", partyRole.partyId))/>
<#assign userLoginApprover = userLoginApprovers[0]>
<#assign userLoginAndPartyDetails = delegator.findOne("UserLoginAndPartyDetails", Static["org.ofbiz.base.util.UtilMisc"].toMap("partyId", userLoginApprover.partyId, "userLoginId", userLoginApprover.userLoginId), false)?if_exists>
- <#if userLoginAndPartyDetails != null && userLoginAndPartyDetails?has_content>
+ <#if userLoginAndPartyDetails?has_content>
<#assign partyContentDetail = delegator.findByAnd("ContentApproval",Static["org.ofbiz.base.util.UtilMisc"].toMap("roleTypeId", "IMAGEAPPROVER", "approvalStatusId", "IM_PENDING", "partyId", userLoginAndPartyDetails.partyId))/>
<#assign imageApproveSize = partyContentDetail.size()>
<#if userLoginAndPartyDetails.userLoginId == userLogin.userLoginId>
Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/price/EditProductPriceRules.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/price/EditProductPriceRules.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/price/EditProductPriceRules.ftl (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/price/EditProductPriceRules.ftl Tue Jun 19 21:36:11 2012
@@ -29,8 +29,8 @@ under the License.
<td width="10%"><b> </b></td>
</tr>
<#if productPriceRule?exists>
- <#assign productPriceConds = productPriceRule.getRelated("ProductPriceCond")>
- <#assign productPriceActions = productPriceRule.getRelated("ProductPriceAction")>
+ <#assign productPriceConds = productPriceRule.getRelated("ProductPriceCond", null, null, false)>
+ <#assign productPriceActions = productPriceRule.getRelated("ProductPriceAction", null, null, false)>
<tr valign="middle">
<td class="label"><b>${productPriceRule.productPriceRuleId}</b></td>
<td>
@@ -83,7 +83,7 @@ under the License.
<input type="hidden" name="productPriceCondSeqId" value="${productPriceCond.productPriceCondSeqId}"/>
<select name="inputParamEnumId" size="1">
<#if productPriceCond.inputParamEnumId?has_content>
- <#assign inputParamEnum = productPriceCond.getRelatedOneCache("InputParamEnumeration")?if_exists>
+ <#assign inputParamEnum = productPriceCond.getRelatedOne("InputParamEnumeration", true)?if_exists>
<option value="${productPriceCond.inputParamEnumId}"><#if inputParamEnum?exists>${inputParamEnum.get("description",locale)}<#else>[${productPriceCond.inputParamEnumId}]</#if></option>
<option value="${productPriceCond.inputParamEnumId}"> </option>
<#else>
@@ -95,7 +95,7 @@ under the License.
</select>
<select name="operatorEnumId" size="1">
<#if productPriceCond.operatorEnumId?has_content>
- <#assign operatorEnum = productPriceCond.getRelatedOneCache("OperatorEnumeration")?if_exists>
+ <#assign operatorEnum = productPriceCond.getRelatedOne("OperatorEnumeration", true)?if_exists>
<option value="${productPriceCond.operatorEnumId}"><#if operatorEnum?exists>${operatorEnum.get("description",locale)}<#else>[${productPriceCond.operatorEnumId}]</#if></option>
<option value="${productPriceCond.operatorEnumId}"> </option>
<#else>
@@ -166,7 +166,7 @@ under the License.
<input type="hidden" name="productPriceActionSeqId" value="${productPriceAction.productPriceActionSeqId}" />
<select name="productPriceActionTypeId" size="1">
<#if productPriceAction.productPriceActionTypeId?has_content>
- <#assign productPriceActionType = productPriceAction.getRelatedOneCache("ProductPriceActionType")>
+ <#assign productPriceActionType = productPriceAction.getRelatedOne("ProductPriceActionType", true)>
<option value="${productPriceAction.productPriceActionTypeId}"><#if productPriceActionType?exists>${productPriceActionType.get("description",locale)}<#else>[${productPriceAction.productPriceActionTypeId}]</#if></option>
<option value="${productPriceAction.productPriceActionTypeId}"> </option>
<#else>
Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/product/ApplyFeaturesFromCategory.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/product/ApplyFeaturesFromCategory.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff
==============================================================================
--- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/product/ApplyFeaturesFromCategory.ftl (original)
+++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/product/ApplyFeaturesFromCategory.ftl Tue Jun 19 21:36:11 2012
@@ -71,7 +71,7 @@ under the License.
<#assign rowClass = "2">
<#if (listSize > 0)>
<#list productFeatures as productFeature>
- <#assign curProductFeatureType = productFeature.getRelatedOneCache("ProductFeatureType")>
+ <#assign curProductFeatureType = productFeature.getRelatedOne("ProductFeatureType", true)>
<tr id="productFeatureId_tableRow_${rowCount}" valign="middle"<#if rowClass == "1"> class="alternate-row"</#if>>
<input type="hidden" name="productFeatureId_o_${rowCount}" value="${productFeature.productFeatureId}" />
<td><a href="<@o...@ofbizUrl>" class="buttontext">${productFeature.productFeatureId}</a></td>