|
Author: doogie
Date: Tue May 29 04:19:07 2012 New Revision: 1343517 URL: http://svn.apache.org/viewvc?rev=1343517&view=rev Log: DEPRECATION: applications/product: GenericValue.getRelated/getRelatedCache variants replaced with a getRelated that takes a boolean useCache parameter. Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java ofbiz/trunk/applications/product/src/org/ofbiz/product/product/KeywordIndex.java ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductEvents.java ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductUtilServices.java ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java ofbiz/trunk/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java ofbiz/trunk/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java ofbiz/trunk/applications/product/src/org/ofbiz/shipment/test/IssuanceTest.java ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSession.java ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContent.groovy ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageUpload.groovy ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/SetDefaultImage.groovy ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/price/EditProductPriceRules.groovy ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromGroup.groovy ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductAssoc.groovy ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductContent.groovy ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductQuickAdmin.groovy ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/promo/EditProductPromoCode.groovy ofbiz/trunk/applications/product/webapp/catalog/price/EditProductPriceRules.ftl ofbiz/trunk/applications/product/webapp/catalog/product/EditProductInventoryItems.ftl ofbiz/trunk/applications/product/webapp/catalog/promo/EditProductPromoRules.ftl ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/EditFacilityLocation.groovy ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryItemTotals.groovy ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/ReceiveInventory.groovy ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/returns/ReceiveReturn.groovy ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/AddItemsFromInventory.groovy ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/AddItemsFromOrder.groovy ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentItems.groovy ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentPackages.groovy ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentPlan.groovy ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentRouteSegments.groovy ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackingSlip.groovy ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PrintPickSheets.groovy ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/QuickShipOrder.groovy ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/ReceiveInventoryAgainstPurchaseOrder.groovy ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/ShipmentManifest.groovy ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/VerifyPick.groovy ofbiz/trunk/applications/product/webapp/facility/facility/PrintPickSheets.fo.ftl ofbiz/trunk/applications/product/webapp/facility/facility/searchInventoryItemsByLabelsForm.ftl ofbiz/trunk/applications/product/webapp/facility/shipment/ShipmentManifest.fo.ftl ofbiz/trunk/applications/product/webapp/facility/shipment/VerifyPick.ftl Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java Tue May 29 04:19:07 2012 @@ -70,7 +70,7 @@ public class CategoryServices { try { productCategory = delegator.findOne("ProductCategory", UtilMisc.toMap("productCategoryId", categoryId), true); - members = EntityUtil.filterByDate(productCategory.getRelatedCache("ProductCategoryMember", null, UtilMisc.toList("sequenceNum")), true); + members = EntityUtil.filterByDate(productCategory.getRelated("ProductCategoryMember", null, UtilMisc.toList("sequenceNum"), true), true); if (Debug.verboseOn()) Debug.logVerbose("Category: " + productCategory + " Member Size: " + members.size() + " Members: " + members, module); } catch (GenericEntityException e) { Debug.logError(e, "Problem reading product categories: " + e.getMessage(), module); Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java Tue May 29 04:19:07 2012 @@ -93,7 +93,7 @@ public class CategoryWorker { Collection<GenericValue> allCategories = delegator.findList("ProductCategory", null, null, null, null, false); for (GenericValue curCat: allCategories) { - Collection<GenericValue> parentCats = curCat.getRelatedCache("CurrentProductCategoryRollup"); + Collection<GenericValue> parentCats = curCat.getRelated("CurrentProductCategoryRollup", null, null, true); if (parentCats.isEmpty()) results.add(curCat); } Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java Tue May 29 04:19:07 2012 @@ -559,7 +559,7 @@ public class ProductConfigWrapper implem public ConfigOption(Delegator delegator, LocalDispatcher dispatcher, GenericValue option, ConfigItem configItem, String catalogId, String webSiteId, String currencyUomId, GenericValue autoUserLogin) throws Exception { configOption = option; parentConfigItem = configItem; - componentList = option.getRelated("ConfigOptionProductConfigProduct"); + componentList = option.getRelated("ConfigOptionProductConfigProduct", null, null, false); for (GenericValue oneComponent: componentList) { BigDecimal listPrice = BigDecimal.ZERO; BigDecimal price = BigDecimal.ZERO; Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java Tue May 29 04:19:07 2012 @@ -462,7 +462,7 @@ public class InventoryServices { // get the reservations in order of newest first List<GenericValue> reservations = null; try { - reservations = inventoryItem.getRelated("OrderItemShipGrpInvRes", null, UtilMisc.toList("-reservedDatetime")); + reservations = inventoryItem.getRelated("OrderItemShipGrpInvRes", null, UtilMisc.toList("-reservedDatetime"), false); } catch (GenericEntityException e) { Debug.logError(e, "Problem getting related reservations", module); return ServiceUtil.returnError(UtilProperties.getMessage(resource, Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/KeywordIndex.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/KeywordIndex.java?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/KeywordIndex.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/KeywordIndex.java Tue May 29 04:19:07 2012 @@ -176,7 +176,7 @@ public class KeywordIndex { for (GenericValue productContentAndInfo: productContentAndInfos) { addWeightedDataResourceString(productContentAndInfo, weight, strings, delegator, product); - List<GenericValue> alternateViews = productContentAndInfo.getRelated("ContentAssocDataResourceViewTo", UtilMisc.toMap("caContentAssocTypeId", "ALTERNATE_LOCALE"), UtilMisc.toList("-caFromDate")); + List<GenericValue> alternateViews = productContentAndInfo.getRelated("ContentAssocDataResourceViewTo", UtilMisc.toMap("caContentAssocTypeId", "ALTERNATE_LOCALE"), UtilMisc.toList("-caFromDate"), false); alternateViews = EntityUtil.filterByDate(alternateViews, UtilDateTime.nowTimestamp(), "caFromDate", "caThruDate", true); for (GenericValue thisView: alternateViews) { addWeightedDataResourceString(thisView, weight, strings, delegator, product); Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductEvents.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductEvents.java?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductEvents.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductEvents.java Tue May 29 04:19:07 2012 @@ -691,7 +691,7 @@ public class ProductEvents { while (!foundFeatureOnVariant && variantIter.hasNext()) { GenericValue variant = variantIter.next(); // get the selectable features for the variant - List<GenericValue> variantProductFeatureAndAppls = variant.getRelated("ProductFeatureAndAppl", UtilMisc.toMap("productFeatureTypeId", productFeatureTypeId, "productFeatureApplTypeId", "STANDARD_FEATURE", "description", description), null); + List<GenericValue> variantProductFeatureAndAppls = variant.getRelated("ProductFeatureAndAppl", UtilMisc.toMap("productFeatureTypeId", productFeatureTypeId, "productFeatureApplTypeId", "STANDARD_FEATURE", "description", description), null, false); if (variantProductFeatureAndAppls.size() > 0) { foundFeatureOnVariant = true; } @@ -774,14 +774,14 @@ public class ProductEvents { List<GenericValue> variants = EntityUtil.getRelated("AssocProduct", variantAssocs); for (GenericValue variant: variants) { // get the selectable features for the variant - List<GenericValue> productFeatureAndAppls = variant.getRelated("ProductFeatureAndAppl", UtilMisc.toMap("productFeatureTypeId", productFeatureTypeId, "productFeatureApplTypeId", "STANDARD_FEATURE"), null); + List<GenericValue> productFeatureAndAppls = variant.getRelated("ProductFeatureAndAppl", UtilMisc.toMap("productFeatureTypeId", productFeatureTypeId, "productFeatureApplTypeId", "STANDARD_FEATURE"), null, false); for (GenericValue productFeatureAndAppl: productFeatureAndAppls) { GenericPK productFeatureApplPK = delegator.makePK("ProductFeatureAppl"); productFeatureApplPK.setPKFields(productFeatureAndAppl); delegator.removeByPrimaryKey(productFeatureApplPK); } } - List<GenericValue> productFeatureAndAppls = product.getRelated("ProductFeatureAndAppl", UtilMisc.toMap("productFeatureTypeId", productFeatureTypeId, "productFeatureApplTypeId", "SELECTABLE_FEATURE"), null); + List<GenericValue> productFeatureAndAppls = product.getRelated("ProductFeatureAndAppl", UtilMisc.toMap("productFeatureTypeId", productFeatureTypeId, "productFeatureApplTypeId", "SELECTABLE_FEATURE"), null, false); for (GenericValue productFeatureAndAppl: productFeatureAndAppls) { GenericPK productFeatureApplPK = delegator.makePK("ProductFeatureAppl"); productFeatureApplPK.setPKFields(productFeatureAndAppl); Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java Tue May 29 04:19:07 2012 @@ -519,9 +519,9 @@ public class ProductServices { productAssocs = delegator.findList("ProductAssoc", cond, null, orderBy, null, true); } else { if (productIdTo == null) { - productAssocs = product.getRelatedCache("MainProductAssoc", UtilMisc.toMap("productAssocTypeId", type), orderBy); + productAssocs = product.getRelated("MainProductAssoc", UtilMisc.toMap("productAssocTypeId", type), orderBy, true); } else { - productAssocs = product.getRelatedCache("AssocProductAssoc", UtilMisc.toMap("productAssocTypeId", type), orderBy); + productAssocs = product.getRelated("AssocProductAssoc", UtilMisc.toMap("productAssocTypeId", type), orderBy, true); } } // filter the list by date Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductUtilServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductUtilServices.java?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductUtilServices.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductUtilServices.java Tue May 29 04:19:07 2012 @@ -443,7 +443,7 @@ public class ProductUtilServices { } protected static void duplicateRelated(GenericValue product, String title, String relatedEntityName, String productIdField, String variantProductId, Timestamp nowTimestamp, boolean removeOld, Delegator delegator, boolean test) throws GenericEntityException { - List<GenericValue> relatedList = EntityUtil.filterByDate(product.getRelated(title + relatedEntityName), nowTimestamp); + List<GenericValue> relatedList = EntityUtil.filterByDate(product.getRelated(title + relatedEntityName, null, null, false), nowTimestamp); for (GenericValue relatedValue: relatedList) { GenericValue newRelatedValue = (GenericValue) relatedValue.clone(); newRelatedValue.set(productIdField, variantProductId); Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java Tue May 29 04:19:07 2012 @@ -92,7 +92,7 @@ public class ProductWorker { Delegator delegator = product.getDelegator(); List<GenericValue> productGeos = null; try { - productGeos = product.getRelated("ProductGeo"); + productGeos = product.getRelated("ProductGeo", null, null, false); } catch (GenericEntityException e) { Debug.logError(e, module); } @@ -635,7 +635,7 @@ public class ProductWorker { // lookup the reviews if we didn't pass them in if (reviews == null) { try { - reviews = product.getRelatedCache("ProductReview", reviewByAnd, UtilMisc.toList("-postedDateTime")); + reviews = product.getRelated("ProductReview", reviewByAnd, UtilMisc.toList("-postedDateTime"), true); } catch (GenericEntityException e) { Debug.logError(e, module); } @@ -689,7 +689,7 @@ public class ProductWorker { } List<GenericValue> categories = FastList.newInstance(); try { - List<GenericValue> categoryMembers = product.getRelated("ProductCategoryMember"); + List<GenericValue> categoryMembers = product.getRelated("ProductCategoryMember", null, null, false); categoryMembers = EntityUtil.filterByDate(categoryMembers); categories = EntityUtil.getRelated("ProductCategory", categoryMembers); } catch (GenericEntityException e) { Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java Tue May 29 04:19:07 2012 @@ -681,7 +681,7 @@ public class ProductStoreWorker { List<GenericValue> productFacilities = null; try { - productFacilities = product.getRelatedCache("ProductFacility"); + productFacilities = product.getRelated("ProductFacility", null, null, true); } catch (GenericEntityException e) { Debug.logWarning(e, "Error invoking getRelatedCache in isCatalogInventoryAvailable", module); return false; Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java Tue May 29 04:19:07 2012 @@ -265,7 +265,7 @@ public class SubscriptionServices { } Timestamp orderCreatedDate = (Timestamp) orderHeader.get("orderDate"); subContext.put("orderCreatedDate", orderCreatedDate); - List<GenericValue> orderItemList = orderHeader.getRelated("OrderItem"); + List<GenericValue> orderItemList = orderHeader.getRelated("OrderItem", null, null, false); for (GenericValue orderItem: orderItemList) { BigDecimal qty = orderItem.getBigDecimal("quantity"); String productId = orderItem.getString("productId"); Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java Tue May 29 04:19:07 2012 @@ -71,14 +71,14 @@ public class SupplierProductServices { results.put("supplierProducts",null); return results; } - List<GenericValue> supplierProducts = product.getRelatedCache("SupplierProduct"); + List<GenericValue> supplierProducts = product.getRelated("SupplierProduct", null, null, true); // if there were no related SupplierProduct entities and the item is a variant, then get the SupplierProducts of the virtual parent product if (supplierProducts.size() == 0 && product.getString("isVariant") != null && product.getString("isVariant").equals("Y")) { String virtualProductId = ProductWorker.getVariantVirtualId(product); GenericValue virtualProduct = delegator.findOne("Product", UtilMisc.toMap("productId", virtualProductId), true); if (virtualProduct != null) { - supplierProducts = virtualProduct.getRelatedCache("SupplierProduct"); + supplierProducts = virtualProduct.getRelated("SupplierProduct", null, null, true); } } @@ -136,7 +136,7 @@ public class SupplierProductServices { // loop through all the features, find the related SupplierProductFeature for the given partyId, and // substitue description and idCode for (GenericValue nextFeature: features) { - List<GenericValue> supplierFeatures = EntityUtil.filterByAnd(nextFeature.getRelated("SupplierProductFeature"), + List<GenericValue> supplierFeatures = EntityUtil.filterByAnd(nextFeature.getRelated("SupplierProductFeature", null, null, false), UtilMisc.toMap("partyId", partyId)); GenericValue supplierFeature = null; Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java Tue May 29 04:19:07 2012 @@ -645,7 +645,7 @@ public class ShipmentServices { List<GenericValue> packages = null; try { - packages = shipment.getRelated("ShipmentPackage") ; + packages = shipment.getRelated("ShipmentPackage", null, null, false) ; } catch (GenericEntityException e) { Debug.logError(e, module); return ServiceUtil.returnError(e.getMessage()); @@ -658,7 +658,7 @@ public class ShipmentServices { List<GenericValue> routeSegs = null; try { - routeSegs = shipment.getRelated("ShipmentRouteSegment"); + routeSegs = shipment.getRelated("ShipmentRouteSegment", null, null, false); } catch (GenericEntityException e) { Debug.logError(e, module); return ServiceUtil.returnError(e.getMessage()); Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentWorker.java Tue May 29 04:19:07 2012 @@ -59,7 +59,7 @@ public class ShipmentWorker { List<GenericValue> issuances = null; try { GenericValue shipmentItem = shipmentPackageContent.getRelatedOne("ShipmentItem", false); - issuances = shipmentItem.getRelated("ItemIssuance"); + issuances = shipmentItem.getRelated("ItemIssuance", null, null, false); } catch (GenericEntityException e) { Debug.logError(e, module); } Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/test/IssuanceTest.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/test/IssuanceTest.java?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/test/IssuanceTest.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/test/IssuanceTest.java Tue May 29 04:19:07 2012 @@ -64,7 +64,7 @@ public class IssuanceTest extends OFBizT GenericValue orderHeader = delegator.findOne("OrderHeader", UtilMisc.toMap("orderId", orderId), true); // Test the OrderShipment is correct - List<GenericValue> orderShipments = orderHeader.getRelated("OrderShipment", null, null); + List<GenericValue> orderShipments = orderHeader.getRelated("OrderShipment", null, null, false); assertFalse("No OrderShipment for order", UtilValidate.isEmpty(orderShipments)); assertEquals( "Incorrect number of OrderShipments for order", 1, orderShipments.size()); @@ -78,7 +78,7 @@ public class IssuanceTest extends OFBizT assertTrue("Incorrect quantity in OrderShipment. Expected 6.00000 actual " + actual, actual.compareTo(BigDecimal.valueOf(6L))==0); // Test the ItemIssuances are correct - List<GenericValue> itemIssuances = orderHeader.getRelated("ItemIssuance", null, UtilMisc.toList("itemIssuanceId")); + List<GenericValue> itemIssuances = orderHeader.getRelated("ItemIssuance", null, UtilMisc.toList("itemIssuanceId"), false); assertFalse("No ItemIssuances for order", UtilValidate.isEmpty(itemIssuances)); assertEquals( "Incorrect number of ItemIssuances for order", 2, itemIssuances.size()); @@ -101,14 +101,14 @@ public class IssuanceTest extends OFBizT assertTrue("Incorrect quantity in ItemIssuance. Expected 1.00000 actual " + actual, actual.compareTo(BigDecimal.valueOf(1L))==0); // Test reservations have been removed - List<GenericValue> reservations = orderHeader.getRelated("OrderItemShipGrpInvRes", null, null); + List<GenericValue> reservations = orderHeader.getRelated("OrderItemShipGrpInvRes", null, null, false); assertTrue("Reservations exist for order - should have been deleted", UtilValidate.isEmpty(reservations)); // Test order header status is now ORDER_COMPLETED assertEquals(orderHeader.getString("statusId"), "ORDER_COMPLETED"); // Test order items status are now ITEM_COMPLETED - List<GenericValue> orderItems = orderHeader.getRelated("OrderItem", null, null); + List<GenericValue> orderItems = orderHeader.getRelated("OrderItem", null, null, false); for ( GenericValue orderItem : orderItems ) assertEquals("ITEM_COMPLETED", orderItem.getString("statusId")); Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/dhl/DhlServices.java Tue May 29 04:19:07 2012 @@ -612,7 +612,7 @@ public class DhlServices { UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId), 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", @@ -650,7 +650,7 @@ public class DhlServices { GenericValue shipmentPackage = shipmentPackageRouteSeg.getRelatedOne("ShipmentPackage", false); GenericValue shipmentBoxType = shipmentPackage.getRelatedOne("ShipmentBoxType", false); /* - List<GenericValue> carrierShipmentBoxTypes = shipmentPackage.getRelated("CarrierShipmentBoxType", UtilMisc.toMap("partyId", "DHL"), null); + List<GenericValue> carrierShipmentBoxTypes = shipmentPackage.getRelated("CarrierShipmentBoxType", UtilMisc.toMap("partyId", "DHL"), null, false); GenericValue carrierShipmentBoxType = null; if (carrierShipmentBoxTypes.size() > 0) { carrierShipmentBoxType = carrierShipmentBoxTypes.get(0); Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java Tue May 29 04:19:07 2012 @@ -693,7 +693,7 @@ public class FedexServices { } } - List<GenericValue> shipmentPackageRouteSegs = shipmentRouteSegment.getRelated("ShipmentPackageRouteSeg", 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)); Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java Tue May 29 04:19:07 2012 @@ -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,14 +462,14 @@ 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"); + 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); @@ -489,7 +489,7 @@ public class UpsServices { GenericValue shipmentPackageRouteSeg = shipmentPackageRouteSegIter.next(); GenericValue shipmentPackage = shipmentPackageRouteSeg.getRelatedOne("ShipmentPackage", false); GenericValue shipmentBoxType = shipmentPackage.getRelatedOne("ShipmentBoxType", false); - List<GenericValue> carrierShipmentBoxTypes = shipmentPackage.getRelated("CarrierShipmentBoxType", UtilMisc.toMap("partyId", "UPS"), null); + List<GenericValue> carrierShipmentBoxTypes = shipmentPackage.getRelated("CarrierShipmentBoxType", UtilMisc.toMap("partyId", "UPS"), null, false); GenericValue carrierShipmentBoxType = null; if (carrierShipmentBoxTypes.size() > 0) { carrierShipmentBoxType = carrierShipmentBoxTypes.get(0); @@ -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)); } @@ -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)); @@ -2959,7 +2959,7 @@ 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)); @@ -2968,7 +2968,7 @@ public class UpsServices { GenericValue shipmentPackage = shipmentPackageRouteSeg.getRelatedOne("ShipmentPackage", false); GenericValue shipmentBoxType = shipmentPackage.getRelatedOne("ShipmentBoxType", false); - List<GenericValue> carrierShipmentBoxTypes = shipmentPackage.getRelated("CarrierShipmentBoxType", UtilMisc.toMap("partyId", "UPS"), null); + List<GenericValue> carrierShipmentBoxTypes = shipmentPackage.getRelated("CarrierShipmentBoxType", UtilMisc.toMap("partyId", "UPS"), null, false); GenericValue carrierShipmentBoxType = null; if (carrierShipmentBoxTypes.size() > 0) { carrierShipmentBoxType = carrierShipmentBoxTypes.get(0); Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java Tue May 29 04:19:07 2012 @@ -1005,7 +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", @@ -1091,7 +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); @@ -1299,7 +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", @@ -1445,7 +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"); @@ -1507,7 +1507,7 @@ public class UspsServices { destinationCountry = destinationAddress.getRelatedOne("CountryGeo", false); } destinationTelecomNumber = shipmentRouteSegment.getRelatedOne("DestTelecomNumber", false); - shipmentPackageRouteSegs = shipmentRouteSegment.getRelated("ShipmentPackageRouteSeg"); + shipmentPackageRouteSegs = shipmentRouteSegment.getRelated("ShipmentPackageRouteSeg", null, null, false); } catch (GenericEntityException e) { Debug.logError(e, module); } @@ -1571,7 +1571,7 @@ public class UspsServices { List<GenericValue> shipmentPackageContents = null; try { shipmentPackage = shipmentPackageRouteSeg.getRelatedOne("ShipmentPackage", false); - shipmentPackageContents = shipmentPackage.getRelated("ShipmentPackageContent"); + 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"))); Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSession.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSession.java?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSession.java (original) +++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSession.java Tue May 29 04:19:07 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/trunk/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContent.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContent.groovy?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContent.groovy (original) +++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/config/EditProductConfigItemContent.groovy Tue May 29 04:19:07 2012 @@ -36,7 +36,7 @@ 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; Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageUpload.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageUpload.groovy?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageUpload.groovy (original) +++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageUpload.groovy Tue May 29 04:19:07 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/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/SetDefaultImage.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/SetDefaultImage.groovy?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/SetDefaultImage.groovy (original) +++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/SetDefaultImage.groovy Tue May 29 04:19:07 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/trunk/applications/product/webapp/catalog/WEB-INF/actions/price/EditProductPriceRules.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/price/EditProductPriceRules.groovy?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/price/EditProductPriceRules.groovy (original) +++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/price/EditProductPriceRules.groovy Tue May 29 04:19:07 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/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromGroup.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromGroup.groovy?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromGroup.groovy (original) +++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromGroup.groovy Tue May 29 04:19:07 2012 @@ -28,7 +28,7 @@ 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", false); Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductAssoc.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductAssoc.groovy?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductAssoc.groovy (original) +++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductAssoc.groovy Tue May 29 04:19:07 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/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductContent.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductContent.groovy?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductContent.groovy (original) +++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductContent.groovy Tue May 29 04:19:07 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/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductQuickAdmin.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductQuickAdmin.groovy?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductQuickAdmin.groovy (original) +++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductQuickAdmin.groovy Tue May 29 04:19:07 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"]); @@ -236,7 +236,7 @@ if (product) { 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/trunk/applications/product/webapp/catalog/WEB-INF/actions/promo/EditProductPromoCode.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/promo/EditProductPromoCode.groovy?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/promo/EditProductPromoCode.groovy (original) +++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/promo/EditProductPromoCode.groovy Tue May 29 04:19:07 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/trunk/applications/product/webapp/catalog/price/EditProductPriceRules.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/price/EditProductPriceRules.ftl?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/price/EditProductPriceRules.ftl (original) +++ ofbiz/trunk/applications/product/webapp/catalog/price/EditProductPriceRules.ftl Tue May 29 04:19:07 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> Modified: ofbiz/trunk/applications/product/webapp/catalog/product/EditProductInventoryItems.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/product/EditProductInventoryItems.ftl?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/product/EditProductInventoryItems.ftl (original) +++ ofbiz/trunk/applications/product/webapp/catalog/product/EditProductInventoryItems.ftl Tue May 29 04:19:07 2012 @@ -58,7 +58,7 @@ under the License. <#assign curStatusItem = inventoryItem.getRelatedOne("StatusItem", true)?if_exists> <#assign facilityLocation = inventoryItem.getRelatedOne("FacilityLocation", false)?if_exists> <#assign facilityLocationTypeEnum = (facilityLocation.getRelatedOne("TypeEnumeration", true))?if_exists> - <#assign inventoryItemDetailFirst = Static["org.ofbiz.entity.util.EntityUtil"].getFirst(inventoryItem.getRelated("InventoryItemDetail", Static["org.ofbiz.base.util.UtilMisc"].toList("effectiveDate")))?if_exists> + <#assign inventoryItemDetailFirst = Static["org.ofbiz.entity.util.EntityUtil"].getFirst(inventoryItem.getRelated("InventoryItemDetail", null, Static["org.ofbiz.base.util.UtilMisc"].toList("effectiveDate"), false))?if_exists> <#if curInventoryItemType?exists> <tr valign="middle"<#if rowClass == "1"> class="alternate-row"</#if>> <td><a href="/facility/control/EditInventoryItem?inventoryItemId=${(inventoryItem.inventoryItemId)?if_exists}${externalKeyParam}" class="buttontext">${(inventoryItem.inventoryItemId)?if_exists}</a></td> Modified: ofbiz/trunk/applications/product/webapp/catalog/promo/EditProductPromoRules.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/promo/EditProductPromoRules.ftl?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/catalog/promo/EditProductPromoRules.ftl (original) +++ ofbiz/trunk/applications/product/webapp/catalog/promo/EditProductPromoRules.ftl Tue May 29 04:19:07 2012 @@ -31,8 +31,8 @@ under the License. </tr> <#assign ruleClass = "2"> <#list productPromoRules as productPromoRule> - <#assign productPromoConds = productPromoRule.getRelated("ProductPromoCond")> - <#assign productPromoActions = productPromoRule.getRelated("ProductPromoAction")> + <#assign productPromoConds = productPromoRule.getRelated("ProductPromoCond", null, null, false)> + <#assign productPromoActions = productPromoRule.getRelated("ProductPromoAction", null, null, false)> <#if productPromoRule_index != 0> <tr><td colspan="3"><hr /></td></tr> </#if> @@ -136,7 +136,7 @@ under the License. </form> <#-- ======================= Categories ======================== --> <div class="label">${uiLabelMap.ProductConditionsCategoriesForCondition} ${(productPromoCond.productPromoCondSeqId)?if_exists}:</div> - <#assign condProductPromoCategories = productPromoCond.getRelated("ProductPromoCategory")> + <#assign condProductPromoCategories = productPromoCond.getRelated("ProductPromoCategory", null, null, false)> <#if condProductPromoCategories?has_content> <#list condProductPromoCategories as condProductPromoCategory> <#assign condProductCategory = condProductPromoCategory.getRelatedOne("ProductCategory", true)> @@ -182,7 +182,7 @@ under the License. </div> <#-- ======================= Products ======================== --> <div class="label">${uiLabelMap.ProductConditionsProductsForCondition} ${(productPromoCond.productPromoCondSeqId)?if_exists}:</div> - <#assign condProductPromoProducts = productPromoCond.getRelated("ProductPromoProduct")> + <#assign condProductPromoProducts = productPromoCond.getRelated("ProductPromoProduct", null, null, false)> <#if condProductPromoProducts?has_content> <#list condProductPromoProducts as condProductPromoProduct> <#assign condProduct = condProductPromoProduct.getRelatedOne("Product", true)?if_exists> @@ -319,7 +319,7 @@ under the License. </div> <#-- ======================= Categories ======================== --> <div class="label">${uiLabelMap.ProductActionsCategoriesForAction} ${(productPromoAction.productPromoActionSeqId)?if_exists}:</div> - <#assign actionProductPromoCategories = productPromoAction.getRelated("ProductPromoCategory")> + <#assign actionProductPromoCategories = productPromoAction.getRelated("ProductPromoCategory", null, null, false)> <#if actionProductPromoCategories?has_content> <#list actionProductPromoCategories as actionProductPromoCategory> <#assign actionProductCategory = actionProductPromoCategory.getRelatedOne("ProductCategory", true)> @@ -366,7 +366,7 @@ under the License. </div> <#-- ======================= Products ======================== --> <div class="label">${uiLabelMap.ProductActionsProductsForAction} ${(productPromoAction.productPromoActionSeqId)?if_exists}:</div> - <#assign actionProductPromoProducts = productPromoAction.getRelated("ProductPromoProduct")> + <#assign actionProductPromoProducts = productPromoAction.getRelated("ProductPromoProduct", null, null, false)> <#if actionProductPromoProducts?has_content> <#list actionProductPromoProducts as actionProductPromoProduct> <#assign actionProduct = actionProductPromoProduct.getRelatedOne("Product", true)?if_exists> Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/EditFacilityLocation.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/EditFacilityLocation.groovy?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/EditFacilityLocation.groovy (original) +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/EditFacilityLocation.groovy Tue May 29 04:19:07 2012 @@ -44,7 +44,7 @@ locationTypeEnums = delegator.findList(" // ProductFacilityLocation stuff productFacilityLocations = null; if (facilityLocation) { - productFacilityLocations = facilityLocation.getRelated("ProductFacilityLocation", null, ['productId']); + productFacilityLocations = facilityLocation.getRelated("ProductFacilityLocation", null, ['productId'], false); } context.facilityId = facilityId; Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryItemTotals.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryItemTotals.groovy?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryItemTotals.groovy (original) +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryItemTotals.groovy Tue May 29 04:19:07 2012 @@ -49,7 +49,7 @@ if (action) { availableToPromiseTotal = inventoryItem.getDouble("availableToPromiseTotal"); costPrice = inventoryItem.getDouble("unitCost"); retailPrice = 0.0; - productPrices = product.getRelated("ProductPrice"); + productPrices = product.getRelated("ProductPrice", null, null, false); if (productPrices) { productPrices.each { productPrice -> if (("DEFAULT_PRICE").equals(productPrice.productPriceTypeId)) { Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/ReceiveInventory.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/ReceiveInventory.groovy?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/ReceiveInventory.groovy (original) +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/ReceiveInventory.groovy Tue May 29 04:19:07 2012 @@ -100,11 +100,11 @@ shippedQuantities = [:]; purchaseOrderItems = null; if (purchaseOrder) { if (product) { - purchaseOrderItems = purchaseOrder.getRelated("OrderItem", [productId : productId], null); + purchaseOrderItems = purchaseOrder.getRelated("OrderItem", [productId : productId], null, false); } else if (shipment) { - orderItems = purchaseOrder.getRelated("OrderItem"); + orderItems = purchaseOrder.getRelated("OrderItem", null, null, false); exprs = [] as ArrayList; - orderShipments = shipment.getRelated("OrderShipment", [orderId : purchaseOrderId], null); + orderShipments = shipment.getRelated("OrderShipment", [orderId : purchaseOrderId], null, false); if (orderShipments) { orderShipments.each { orderShipment -> exprs.add(EntityCondition.makeCondition("orderItemSeqId", EntityOperator.EQUALS, orderShipment.orderItemSeqId)); @@ -116,7 +116,7 @@ if (purchaseOrder) { } } else { // this is here for backward compatibility only: ItemIssuances are no more created for purchase shipments. - issuances = shipment.getRelated("ItemIssuance", [orderId : purchaseOrderId], null); + issuances = shipment.getRelated("ItemIssuance", [orderId : purchaseOrderId], null, false); issuances.each { issuance -> exprs.add(EntityCondition.makeCondition("orderItemSeqId", EntityOperator.EQUALS, issuance.orderItemSeqId)); double issuanceQty = issuance.getDouble("quantity").doubleValue(); @@ -128,7 +128,7 @@ if (purchaseOrder) { } purchaseOrderItems = EntityUtil.filterByOr(orderItems, exprs); } else { - purchaseOrderItems = purchaseOrder.getRelated("OrderItem"); + purchaseOrderItems = purchaseOrder.getRelated("OrderItem", null, null, false); } purchaseOrderItems = EntityUtil.filterByAnd(purchaseOrderItems, [EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ITEM_CANCELLED")]); } @@ -171,7 +171,7 @@ if (purchaseOrderItems) { context.purchaseOrderItemsSize = purchaseOrderItems.size(); purchaseOrderItems.each { thisItem -> totalReceived = 0.0; - receipts = thisItem.getRelated("ShipmentReceipt"); + receipts = thisItem.getRelated("ShipmentReceipt", null, null, false); if (receipts) { receipts.each { rec -> if (!shipment || (rec.shipmentId && rec.shipmentId.equals(shipment.shipmentId))) { Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/returns/ReceiveReturn.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/returns/ReceiveReturn.groovy?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/returns/ReceiveReturn.groovy (original) +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/returns/ReceiveReturn.groovy Tue May 29 04:19:07 2012 @@ -36,7 +36,7 @@ if (returnId) { returnHeader = delegator.findOne("ReturnHeader", [returnId : returnId], false); if (returnHeader) { if ("RETURN_ACCEPTED".equals(returnHeader.statusId)) { - returnItems = returnHeader.getRelated("ReturnItem"); + returnItems = returnHeader.getRelated("ReturnItem", null, null, false); } else if ("RETURN_REQUESTED".equals(returnHeader.statusId)) { uiLabelMap = UtilProperties.getResourceBundleMap("ProductErrorUiLabels", locale); ProductReturnRequestedOK = uiLabelMap.ProductReturnRequestedOK; @@ -55,7 +55,7 @@ if (returnItems) { context.returnItemsSize = returnItems.size(); returnItems.each { thisItem -> totalReceived = 0.0; - receipts = thisItem.getRelated("ShipmentReceipt"); + receipts = thisItem.getRelated("ShipmentReceipt", null, null, false); if (receipts) { receipts.each { rec -> accepted = rec.getDouble("quantityAccepted"); Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/AddItemsFromInventory.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/AddItemsFromInventory.groovy?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/AddItemsFromInventory.groovy (original) +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/AddItemsFromInventory.groovy Tue May 29 04:19:07 2012 @@ -25,17 +25,17 @@ shipmentId = parameters.shipmentId; items = []; shipment = delegator.findOne("Shipment", [shipmentId : shipmentId], false); partyId = shipment.partyIdTo; -shipmentItems = shipment.getRelated("ShipmentItem"); +shipmentItems = shipment.getRelated("ShipmentItem", null, null, false); shipmentItems.each { shipmentItem -> productId = shipmentItem.productId; - internalName = shipmentItem.getRelated("Product").internalName; + internalName = shipmentItem.getRelated("Product", null, null, false).internalName; EntityCondition cond = EntityCondition.makeCondition([EntityCondition.makeCondition("returnId", shipment.primaryReturnId), EntityCondition.makeCondition("productId", productId)], EntityOperator.AND); returnItem = EntityUtil.getFirst(delegator.findList("ReturnItem", cond, null, null, null, true)); returnQuantity = Double.valueOf(returnItem.returnQuantity); shipmentItemQty = Double.valueOf(shipmentItem.quantity); - itemIssuances = shipmentItem.getRelated("ItemIssuance", [shipmentId : shipmentId, shipmentItemSeqId : shipmentItem.shipmentItemSeqId], ["inventoryItemId"]); + itemIssuances = shipmentItem.getRelated("ItemIssuance", [shipmentId : shipmentId, shipmentItemSeqId : shipmentItem.shipmentItemSeqId], ["inventoryItemId"], false); totalQtyIssued = 0; issuedItems = []; itemIssuances.each { itemIssuance -> Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/AddItemsFromOrder.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/AddItemsFromOrder.groovy?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/AddItemsFromOrder.groovy (original) +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/AddItemsFromOrder.groovy Tue May 29 04:19:07 2012 @@ -61,13 +61,13 @@ if (orderId && shipment) { if (orderItemShipGroup) { oiasgaLimitMap = [shipGroupSeqId : shipGroupSeqId]; } - orderItems = orderHeader.getRelated("OrderItemAndShipGroupAssoc", oiasgaLimitMap, ['shipGroupSeqId', 'orderItemSeqId']); + orderItems = orderHeader.getRelated("OrderItemAndShipGroupAssoc", oiasgaLimitMap, ['shipGroupSeqId', 'orderItemSeqId'], false); orderItemDatas = [] as LinkedList; orderItems.each { orderItemAndShipGroupAssoc -> orderItemData = [:]; product = orderItemAndShipGroupAssoc.getRelatedOne("Product", false); - itemIssuances = orderItemAndShipGroupAssoc.getRelated("ItemIssuance"); + itemIssuances = orderItemAndShipGroupAssoc.getRelated("ItemIssuance", null, null, false); totalQuantityIssued = 0; itemIssuances.each { itemIssuance -> if (itemIssuance.quantity) { @@ -83,7 +83,7 @@ if (orderId && shipment) { if (orderItemShipGroup) { oisgirLimitMap = [shipGroupSeqId : shipGroupSeqId]; } - orderItemShipGrpInvResList = orderItemAndShipGroupAssoc.getRelated("OrderItemShipGrpInvRes", oisgirLimitMap, ['reservedDatetime']); + orderItemShipGrpInvResList = orderItemAndShipGroupAssoc.getRelated("OrderItemShipGrpInvRes", oisgirLimitMap, ['reservedDatetime'], false); orderItemShipGrpInvResDatas = [] as LinkedList; totalQuantityReserved = 0; orderItemShipGrpInvResList.each { orderItemShipGrpInvRes -> @@ -143,7 +143,7 @@ if (shipment && selectFromShipmentPlan) product = orderItem.getRelatedOne("Product", false); - itemIssuances = orderItem.getRelated("ItemIssuance"); + itemIssuances = orderItem.getRelated("ItemIssuance", null, null, false); totalQuantityIssued = 0; totalQuantityIssuedInShipment = 0; itemIssuances.each { itemIssuance -> @@ -161,7 +161,7 @@ if (shipment && selectFromShipmentPlan) } } - orderItemShipGrpInvResList = orderItem.getRelated("OrderItemShipGrpInvRes", null, ['reservedDatetime']); + orderItemShipGrpInvResList = orderItem.getRelated("OrderItemShipGrpInvRes", null, ['reservedDatetime'], false); orderItemShipGrpInvResDatas = [] as LinkedList; totalQuantityReserved = 0; orderItemShipGrpInvResList.each { orderItemShipGrpInvRes -> Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentItems.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentItems.groovy?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentItems.groovy (original) +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentItems.groovy Tue May 29 04:19:07 2012 @@ -31,11 +31,11 @@ if (shipmentId) { } if (shipment) { - shipmentItems = shipment.getRelated("ShipmentItem", null, ['shipmentItemSeqId']); + shipmentItems = shipment.getRelated("ShipmentItem", null, ['shipmentItemSeqId'], false); shipmentItemDatas = [] as LinkedList; if (shipmentItems) { shipmentItems.each { shipmentItem -> - shipmentPackageContents = shipmentItem.getRelated("ShipmentPackageContent"); + shipmentPackageContents = shipmentItem.getRelated("ShipmentPackageContent", null, null, false); totalQuantityPackaged = 0; shipmentPackageContents.each { shipmentPackageContent -> if (shipmentPackageContent.quantity) { @@ -51,15 +51,15 @@ if (shipment) { shipmentItemData = [:]; shipmentItemData.shipmentItem = shipmentItem; shipmentItemData.shipmentPackageContents = shipmentPackageContents; - shipmentItemData.itemIssuances = shipmentItem.getRelated("ItemIssuance"); - shipmentItemData.orderShipments = shipmentItem.getRelated("OrderShipment"); + shipmentItemData.itemIssuances = shipmentItem.getRelated("ItemIssuance", null, null, false); + shipmentItemData.orderShipments = shipmentItem.getRelated("OrderShipment", null, null, false); shipmentItemData.product = shipmentItem.getRelatedOne("Product", false); shipmentItemData.totalQuantityPackaged = totalQuantityPackaged; shipmentItemData.totalQuantityToPackage = totalQuantityToPackage; shipmentItemDatas.add(shipmentItemData); } } - shipmentPackages = shipment.getRelated("ShipmentPackage", null, ['shipmentPackageSeqId']); + shipmentPackages = shipment.getRelated("ShipmentPackage", null, ['shipmentPackageSeqId'], false); context.shipment = shipment; context.shipmentItemDatas = shipmentItemDatas; Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentPackages.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentPackages.groovy?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentPackages.groovy (original) +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentPackages.groovy Tue May 29 04:19:07 2012 @@ -30,21 +30,21 @@ if (shipmentId) { } if (shipment) { - shipmentPackages = shipment.getRelated("ShipmentPackage", null, ['shipmentPackageSeqId']); + shipmentPackages = shipment.getRelated("ShipmentPackage", null, ['shipmentPackageSeqId'], false); shipmentPackageDatas = [] as LinkedList; if (shipmentPackages) { shipmentPackages.each { shipmentPackage -> shipmentPackageData = [:]; shipmentPackageData.shipmentPackage = shipmentPackage; - shipmentPackageData.shipmentPackageContents = shipmentPackage.getRelated("ShipmentPackageContent"); - shipmentPackageData.shipmentPackageRouteSegs = shipmentPackage.getRelated("ShipmentPackageRouteSeg"); + shipmentPackageData.shipmentPackageContents = shipmentPackage.getRelated("ShipmentPackageContent", null, null, false); + shipmentPackageData.shipmentPackageRouteSegs = shipmentPackage.getRelated("ShipmentPackageRouteSeg", null, null, false); shipmentPackageData.weightUom = shipmentPackage.getRelatedOne("WeightUom", false); shipmentPackageDatas.add(shipmentPackageData); } } - shipmentItems = shipment.getRelated("ShipmentItem", null, ['shipmentItemSeqId']); - shipmentRouteSegments = shipment.getRelated("ShipmentRouteSegment", null, ['shipmentRouteSegmentId']); + shipmentItems = shipment.getRelated("ShipmentItem", null, ['shipmentItemSeqId'], false); + shipmentRouteSegments = shipment.getRelated("ShipmentRouteSegment", null, ['shipmentRouteSegmentId'], false); weightUoms = delegator.findList("Uom", EntityCondition.makeCondition([uomTypeId : 'WEIGHT_MEASURE']), null, ['description'], null, false); boxTypes = delegator.findList("ShipmentBoxType", null, null, null, null, false); Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentPlan.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentPlan.groovy?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentPlan.groovy (original) +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentPlan.groovy Tue May 29 04:19:07 2012 @@ -77,7 +77,7 @@ if (shipmentPlans) { // Total quantity issued issuedQuantity = 0.0; qtyIssuedInShipment = [:]; - issuances = orderItem.getRelated("ItemIssuance"); + issuances = orderItem.getRelated("ItemIssuance", null, null, false); issuances.each { issuance -> if (issuance.quantity) { issuedQuantity += issuance.getDouble("quantity"); @@ -135,7 +135,7 @@ if (shipmentPlans) { // Reserved and Not Available quantity reservedQuantity = 0.0; reservedNotAvailable = 0.0; - reservations = orderItem.getRelated("OrderItemShipGrpInvRes"); + reservations = orderItem.getRelated("OrderItemShipGrpInvRes", null, null, false); reservations.each { reservation -> if (reservation.quantity) { reservedQuantity += reservation.getDouble("quantity"); @@ -206,7 +206,7 @@ if (orderItemShipGroupAssocs) { // Total quantity issued issuedQuantity = 0.0; qtyIssuedInShipment = [:]; - issuances = orderItem.getRelated("ItemIssuance"); + issuances = orderItem.getRelated("ItemIssuance", null, null, false); issuances.each { issuance -> if (issuance.quantity) { issuedQuantity += issuance.getDouble("quantity"); Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentRouteSegments.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentRouteSegments.groovy?rev=1343517&r1=1343516&r2=1343517&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentRouteSegments.groovy (original) +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentRouteSegments.groovy Tue May 29 04:19:07 2012 @@ -31,7 +31,7 @@ if (shipmentId) { } if (shipment) { - shipmentRouteSegments = shipment.getRelated("ShipmentRouteSegment", null, ['shipmentRouteSegmentId']); + shipmentRouteSegments = shipment.getRelated("ShipmentRouteSegment", null, ['shipmentRouteSegmentId'], false); shipmentRouteSegmentDatas = [] as LinkedList; if (shipmentRouteSegments) { shipmentRouteSegments.each { shipmentRouteSegment -> @@ -46,7 +46,7 @@ if (shipment) { shipmentRouteSegmentData.shipmentMethodType = shipmentRouteSegment.getRelatedOne("ShipmentMethodType", false); shipmentRouteSegmentData.carrierPerson = shipmentRouteSegment.getRelatedOne("CarrierPerson", false); shipmentRouteSegmentData.carrierPartyGroup = shipmentRouteSegment.getRelatedOne("CarrierPartyGroup", false); - shipmentRouteSegmentData.shipmentPackageRouteSegs = shipmentRouteSegment.getRelated("ShipmentPackageRouteSeg"); + shipmentRouteSegmentData.shipmentPackageRouteSegs = shipmentRouteSegment.getRelated("ShipmentPackageRouteSeg", null, null, false); shipmentRouteSegmentData.carrierServiceStatusItem = shipmentRouteSegment.getRelatedOne("CarrierServiceStatusItem", false); shipmentRouteSegmentData.currencyUom = shipmentRouteSegment.getRelatedOne("CurrencyUom", false); shipmentRouteSegmentData.billingWeightUom = shipmentRouteSegment.getRelatedOne("BillingWeightUom", false); @@ -59,7 +59,7 @@ if (shipment) { } } - shipmentPackages = shipment.getRelated("ShipmentPackage", null, ['shipmentPackageSeqId']); + shipmentPackages = shipment.getRelated("ShipmentPackage", null, ['shipmentPackageSeqId'], false); facilities = delegator.findList("Facility", null, null, ['facilityName'], null, false); shipmentMethodTypes = delegator.findList("ShipmentMethodType", null, null, ['description'], null, false); weightUoms = delegator.findList("Uom", EntityCondition.makeCondition([uomTypeId : 'WEIGHT_MEASURE']), null, null, null, false); |
| Free forum by Nabble | Edit this page |
