|
Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/product/EditProductAssoc.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/product/EditProductAssoc.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/product/EditProductAssoc.ftl (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/product/EditProductAssoc.ftl Tue Jun 19 21:36:11 2012 @@ -108,7 +108,7 @@ under the License. </#if> <#else> <#assign isCreate = false> - <#assign curProductAssocType = productAssoc.getRelatedOneCache("ProductAssocType")> + <#assign curProductAssocType = productAssoc.getRelatedOne("ProductAssocType", true)> <input type="hidden" name="UPDATE_MODE" value="UPDATE" /> <input type="hidden" name="PRODUCT_ID" value="${productId?if_exists}" /> <input type="hidden" name="PRODUCT_ID_TO" value="${productIdTo?if_exists}" /> @@ -201,8 +201,8 @@ under the License. </tr> <#assign rowClass = "2"> <#list assocFromProducts as assocFromProduct> - <#assign listToProduct = assocFromProduct.getRelatedOneCache("AssocProduct")> - <#assign curProductAssocType = assocFromProduct.getRelatedOneCache("ProductAssocType")> + <#assign listToProduct = assocFromProduct.getRelatedOne("AssocProduct", true)> + <#assign curProductAssocType = assocFromProduct.getRelatedOne("ProductAssocType", true)> <tr valign="middle"<#if rowClass == "1"> class="alternate-row"</#if>> <td><a href="<@ofbizUrl>EditProduct?productId=${(assocFromProduct.productIdTo)?if_exists}</@ofbizUrl>" class="buttontext">${(assocFromProduct.productIdTo)?if_exists}</a></td> <td><#if listToProduct?exists><a href="<@ofbizUrl>EditProduct?productId=${(assocFromProduct.productIdTo)?if_exists}</@ofbizUrl>" class="buttontext">${(listToProduct.internalName)?if_exists}</a></#if> </td> @@ -248,8 +248,8 @@ under the License. </tr> <#assign rowClass = "2"> <#list assocToProducts as assocToProduct> - <#assign listToProduct = assocToProduct.getRelatedOneCache("MainProduct")> - <#assign curProductAssocType = assocToProduct.getRelatedOneCache("ProductAssocType")> + <#assign listToProduct = assocToProduct.getRelatedOne("MainProduct", true)> + <#assign curProductAssocType = assocToProduct.getRelatedOne("ProductAssocType", true)> <tr valign="middle"<#if rowClass == "1"> class="alternate-row"</#if>> <td><a href="<@ofbizUrl>EditProduct?productId=${(assocToProduct.productId)?if_exists}</@ofbizUrl>" class="buttontext">${(assocToProduct.productId)?if_exists}</a></td> <td><#if listToProduct?exists><a href="<@ofbizUrl>EditProduct?productId=${(assocToProduct.productId)?if_exists}</@ofbizUrl>" class="buttontext">${(listToProduct.internalName)?if_exists}</a></#if></td> Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/product/EditProductFeatures.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/product/EditProductFeatures.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/product/EditProductFeatures.ftl (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/product/EditProductFeatures.ftl Tue Jun 19 21:36:11 2012 @@ -42,9 +42,9 @@ under the License. <#if productFeatureAndAppl.uomId?exists> <#assign curProductFeatureUom = delegator.findOne("Uom",{"uomId",productFeatureAndAppl.uomId}, true)> </#if> - <#assign curProductFeatureType = productFeatureAndAppl.getRelatedOneCache("ProductFeatureType")> - <#assign curProductFeatureApplType = productFeatureAndAppl.getRelatedOneCache("ProductFeatureApplType")> - <#assign curProductFeatureCategory = (productFeatureAndAppl.getRelatedOneCache("ProductFeatureCategory")?if_exists)> + <#assign curProductFeatureType = productFeatureAndAppl.getRelatedOne("ProductFeatureType", true)> + <#assign curProductFeatureApplType = productFeatureAndAppl.getRelatedOne("ProductFeatureApplType", true)> + <#assign curProductFeatureCategory = (productFeatureAndAppl.getRelatedOne("ProductFeatureCategory", true)?if_exists)> <tr id="productFeatureId_tableRow_${productFeatureAndAppl_index}" valign="middle"<#if rowClass == "1"> class="alternate-row"</#if>> <td> <input type="hidden" name="productId_o_${productFeatureAndAppl_index}" value="${(productFeatureAndAppl.productId)?if_exists}" /> Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/product/EditProductInventoryItems.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/product/EditProductInventoryItems.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/product/EditProductInventoryItems.ftl (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/product/EditProductInventoryItems.ftl Tue Jun 19 21:36:11 2012 @@ -54,11 +54,11 @@ under the License. <#-- NOTE: Delivered for serialized inventory means shipped to customer so they should not be displayed here any more --> <#if showEmpty || (inventoryItem.inventoryItemTypeId?if_exists == "SERIALIZED_INV_ITEM" && inventoryItem.statusId?if_exists != "INV_DELIVERED") || (inventoryItem.inventoryItemTypeId?if_exists == "NON_SERIAL_INV_ITEM" && ((inventoryItem.availableToPromiseTotal?exists && inventoryItem.availableToPromiseTotal != 0) || (inventoryItem.quantityOnHandTotal?exists && inventoryItem.quantityOnHandTotal != 0)))> - <#assign curInventoryItemType = inventoryItem.getRelatedOne("InventoryItemType")> - <#assign curStatusItem = inventoryItem.getRelatedOneCache("StatusItem")?if_exists> - <#assign facilityLocation = inventoryItem.getRelatedOne("FacilityLocation")?if_exists> - <#assign facilityLocationTypeEnum = (facilityLocation.getRelatedOneCache("TypeEnumeration"))?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 curInventoryItemType = inventoryItem.getRelatedOne("InventoryItemType", false)> + <#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", 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> @@ -125,4 +125,4 @@ under the License. <#else> <h2>${uiLabelMap.ProductProductNotFound} ${productId?if_exists}!</h2> </#if> -</div> \ No newline at end of file +</div> Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/product/EditProductParties.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/product/EditProductParties.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/product/EditProductParties.ftl (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/product/EditProductParties.ftl Tue Jun 19 21:36:11 2012 @@ -33,7 +33,7 @@ under the License. <#assign rowClass = "2"> <#list productRoles as productRole> <#assign line = line + 1> - <#assign curRoleType = productRole.getRelatedOneCache("RoleType")> + <#assign curRoleType = productRole.getRelatedOne("RoleType", true)> <tr valign="middle"<#if rowClass == "1"> class="alternate-row"</#if>> <td><a href="/partymgr/control/viewprofile?partyId=${(productRole.partyId)?if_exists}" target="_blank" class="buttontext">${(productRole.partyId)?if_exists}</a></td> <td>${(curRoleType.get("description",locale))?if_exists}</td> Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/product/EditProductQuickAdmin.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/product/EditProductQuickAdmin.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/product/EditProductQuickAdmin.ftl (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/product/EditProductQuickAdmin.ftl Tue Jun 19 21:36:11 2012 @@ -120,7 +120,7 @@ function doPublish() { <#assign idx=0/> <#assign rowClass = "2"> <#list productAssocs as productAssoc> - <#assign assocProduct = productAssoc.getRelatedOne("AssocProduct")/> + <#assign assocProduct = productAssoc.getRelatedOne("AssocProduct", false)/> <tr valign="middle"<#if rowClass == "1"> class="alternate-row"</#if>> <td nowrap="nowrap"> <input type="hidden" name="productId${idx}" value="${assocProduct.productId?if_exists}"/> @@ -403,7 +403,7 @@ function doPublish() { <table cellspacing="0" class="basic-table"> <#assign rowClass = "2"> <#list productCategoryMembers as prodCatMemb> - <#assign prodCat = prodCatMemb.getRelatedOne("ProductCategory")/> + <#assign prodCat = prodCatMemb.getRelatedOne("ProductCategory", false)/> <tr valign="middle"<#if rowClass == "1"> class="alternate-row"</#if>> <td colspan="2"> <form name="quickAdminRemoveProductFromCategory_${prodCatMemb_index}" action="<@ofbizUrl>quickAdminRemoveProductFromCategory</@ofbizUrl>" method="post"> Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/product/ViewProductOrders.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/product/ViewProductOrders.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/product/ViewProductOrders.ftl (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/product/ViewProductOrders.ftl Tue Jun 19 21:36:11 2012 @@ -76,13 +76,13 @@ under the License. <#list orderItems as orderItem> <tr> <td><a href="/ordermgr/control/orderview?orderId=${orderItem.orderId}" class='buttontext'>${orderItem.orderId}</a></td> - <#assign currentItemStatus = orderItem.getRelatedOne("StatusItem")/> + <#assign currentItemStatus = orderItem.getRelatedOne("StatusItem", false)/> <td>${currentItemStatus.get("description",locale)?default(currentItemStatus.statusId)}</td> <td>${orderItem.orderItemSeqId}</td> <td>${order.orderDate}</td> <td>${orderItem.unitPrice}</td> <td>${orderItem.quantity}</td> - <#assign currentOrderType = order.getRelatedOne("OrderType")/> + <#assign currentOrderType = order.getRelatedOne("OrderType", false)/> <td>${currentOrderType.get("description",locale)?default(currentOrderType.orderTypeId)}</td> </tr> </#list> Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/promo/EditProductPromoRules.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/promo/EditProductPromoRules.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/promo/EditProductPromoRules.ftl (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/promo/EditProductPromoRules.ftl Tue Jun 19 21:36:11 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> @@ -81,7 +81,7 @@ under the License. <input type="hidden" name="productPromoCondSeqId" value="${(productPromoCond.productPromoCondSeqId)?if_exists}"/> <select name="inputParamEnumId" size="1"> <#if (productPromoCond.inputParamEnumId)?exists> - <#assign inputParamEnum = productPromoCond.getRelatedOneCache("InputParamEnumeration")> + <#assign inputParamEnum = productPromoCond.getRelatedOne("InputParamEnumeration", true)> <option value="${productPromoCond.inputParamEnumId}"><#if inputParamEnum?exists>${(inputParamEnum.get("description",locale))?if_exists}<#else>[${(productPromoCond.inputParamEnumId)?if_exists}]</#if></option> <option value="${(productPromoCond.inputParamEnumId)?if_exists}"> </option> <#else> @@ -93,7 +93,7 @@ under the License. </select> <select name="operatorEnumId" size="1"> <#if (productPromoCond.operatorEnumId)?exists> - <#assign operatorEnum = productPromoCond.getRelatedOneCache("OperatorEnumeration")> + <#assign operatorEnum = productPromoCond.getRelatedOne("OperatorEnumeration", true)> <option value="${(productPromoCond.operatorEnumId)?if_exists}"><#if operatorEnum?exists>${(operatorEnum.get("description",locale))?if_exists}<#else>[${(productPromoCond.operatorEnumId)?if_exists}]</#if></option> <option value="${(productPromoCond.operatorEnumId)?if_exists}"> </option> <#else> @@ -122,7 +122,7 @@ under the License. <option value = "${carrierShippingMethod?if_exists}">${carrierParty?if_exists} ${description}</option> <option value = ""> </option> <#list carrierShipmentMethods as carrierShipmentMethod> - <#assign shipmentMethodType = carrierShipmentMethod.getRelatedOneCache("ShipmentMethodType")> + <#assign shipmentMethodType = carrierShipmentMethod.getRelatedOne("ShipmentMethodType", true)> <option value = "${carrierShipmentMethod.partyId?if_exists}@${carrierShipmentMethod.shipmentMethodTypeId?if_exists}">${carrierShipmentMethod.partyId?if_exists} ${shipmentMethodType.get("description")?if_exists}</option> </#list> </select> @@ -136,11 +136,11 @@ 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.getRelatedOneCache("ProductCategory")> - <#assign condApplEnumeration = condProductPromoCategory.getRelatedOneCache("ApplEnumeration")> + <#assign condProductCategory = condProductPromoCategory.getRelatedOne("ProductCategory", true)> + <#assign condApplEnumeration = condProductPromoCategory.getRelatedOne("ApplEnumeration", true)> <div> ${(condProductCategory.get("description",locale))?if_exists} [${condProductPromoCategory.productCategoryId}] - ${(condApplEnumeration.get("description",locale))?default(condProductPromoCategory.productPromoApplEnumId)} @@ -182,11 +182,11 @@ 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.getRelatedOneCache("Product")?if_exists> - <#assign condApplEnumeration = condProductPromoProduct.getRelatedOneCache("ApplEnumeration")> + <#assign condProduct = condProductPromoProduct.getRelatedOne("Product", true)?if_exists> + <#assign condApplEnumeration = condProductPromoProduct.getRelatedOne("ApplEnumeration", true)> <div> ${(condProduct.internalName)?if_exists} [${condProductPromoProduct.productId}] - ${(condApplEnumeration.get("description",locale))?default(condProductPromoProduct.productPromoApplEnumId)} @@ -251,7 +251,7 @@ under the License. <select name = "carrierShipmentMethod"> <option value = "">--${uiLabelMap.OrderSelectShippingMethod}--</option> <#list carrierShipmentMethods as carrierShipmentMethod> - <#assign shipmentMethodType = carrierShipmentMethod.getRelatedOneCache("ShipmentMethodType")> + <#assign shipmentMethodType = carrierShipmentMethod.getRelatedOne("ShipmentMethodType", true)> <option value = "${carrierShipmentMethod.partyId?if_exists}@${carrierShipmentMethod.shipmentMethodTypeId?if_exists}">${carrierShipmentMethod.partyId?if_exists} ${shipmentMethodType.get("description")?if_exists}</option> </#list> </select> @@ -280,7 +280,7 @@ under the License. <input type="hidden" name="productPromoActionSeqId" value="${(productPromoAction.productPromoActionSeqId)?if_exists}" /> <select name="productPromoActionEnumId" size="1"> <#if (productPromoAction.productPromoActionEnumId)?exists> - <#assign productPromoActionCurEnum = productPromoAction.getRelatedOneCache("ActionEnumeration")> + <#assign productPromoActionCurEnum = productPromoAction.getRelatedOne("ActionEnumeration", true)> <option value="${(productPromoAction.productPromoActionEnumId)?if_exists}"><#if productPromoActionCurEnum?exists>${(productPromoActionCurEnum.get("description",locale))?if_exists}<#else>[${(productPromoAction.productPromoActionEnumId)?if_exists}]</#if></option> <option value="${(productPromoAction.productPromoActionEnumId)?if_exists}"> </option> <#else> @@ -299,7 +299,7 @@ under the License. ${uiLabelMap.UseCartQuantity}: <select name="useCartQuantity"> <#if (productPromoAction.useCartQuantity)?exists> - <#assign productPromoActionCurEnum = productPromoAction.getRelatedOneCache("ActionEnumeration")> + <#assign productPromoActionCurEnum = productPromoAction.getRelatedOne("ActionEnumeration", true)> <option value="${(productPromoAction.useCartQuantity)?if_exists}"><#if (productPromoAction.useCartQuantity.equals("Y"))>${uiLabelMap.CommonY}<#else>${uiLabelMap.CommonN}</#if></option> <option value="${(productPromoAction.useCartQuantity)?if_exists}"> </option> <#else> @@ -319,11 +319,11 @@ 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.getRelatedOneCache("ProductCategory")> - <#assign actionApplEnumeration = actionProductPromoCategory.getRelatedOneCache("ApplEnumeration")> + <#assign actionProductCategory = actionProductPromoCategory.getRelatedOne("ProductCategory", true)> + <#assign actionApplEnumeration = actionProductPromoCategory.getRelatedOne("ApplEnumeration", true)> <div> ${(actionProductCategory.description)?if_exists} [${actionProductPromoCategory.productCategoryId}] - ${(actionApplEnumeration.get("description",locale))?default(actionProductPromoCategory.productPromoApplEnumId)} @@ -366,11 +366,11 @@ 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.getRelatedOneCache("Product")?if_exists> - <#assign actionApplEnumeration = actionProductPromoProduct.getRelatedOneCache("ApplEnumeration")> + <#assign actionProduct = actionProductPromoProduct.getRelatedOne("Product", true)?if_exists> + <#assign actionApplEnumeration = actionProductPromoProduct.getRelatedOne("ApplEnumeration", true)> <div> ${(actionProduct.internalName)?if_exists} [${actionProductPromoProduct.productId}] - ${(actionApplEnumeration.get("description",locale))?default(actionProductPromoProduct.productPromoApplEnumId)} @@ -476,8 +476,8 @@ under the License. <#-- ======================= Categories ======================== --> <div class="screenlet-body"> <#list promoProductPromoCategories as promoProductPromoCategory> - <#assign promoProductCategory = promoProductPromoCategory.getRelatedOneCache("ProductCategory")> - <#assign promoApplEnumeration = promoProductPromoCategory.getRelatedOneCache("ApplEnumeration")> + <#assign promoProductCategory = promoProductPromoCategory.getRelatedOne("ProductCategory", true)> + <#assign promoApplEnumeration = promoProductPromoCategory.getRelatedOne("ApplEnumeration", true)> <div> ${(promoProductCategory.description)?if_exists} [${promoProductPromoCategory.productCategoryId}] - ${(promoApplEnumeration.get("description",locale))?default(promoProductPromoCategory.productPromoApplEnumId)} @@ -523,8 +523,8 @@ under the License. <#-- ======================= Products ======================== --> <div class="screenlet-body"> <#list promoProductPromoProducts as promoProductPromoProduct> - <#assign promoProduct = promoProductPromoProduct.getRelatedOneCache("Product")?if_exists> - <#assign promoApplEnumeration = promoProductPromoProduct.getRelatedOneCache("ApplEnumeration")> + <#assign promoProduct = promoProductPromoProduct.getRelatedOne("Product", true)?if_exists> + <#assign promoApplEnumeration = promoProductPromoProduct.getRelatedOne("ApplEnumeration", true)> <div> ${(promoProduct.internalName)?if_exists} [${promoProductPromoProduct.productId}] - ${(promoApplEnumeration.get("description",locale))?default(promoProductPromoProduct.productPromoApplEnumId)} Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/promo/EditProductPromoStores.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/promo/EditProductPromoStores.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/promo/EditProductPromoStores.ftl (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/promo/EditProductPromoStores.ftl Tue Jun 19 21:36:11 2012 @@ -33,7 +33,7 @@ under the License. <#assign rowClass = "2"> <#list productStorePromoAppls as productStorePromoAppl> <#assign line = line + 1> - <#assign productStore = productStorePromoAppl.getRelatedOne("ProductStore")> + <#assign productStore = productStorePromoAppl.getRelatedOne("ProductStore", false)> <tr valign="middle"<#if rowClass == "1"> class="alternate-row"</#if>> <td><a href="<@ofbizUrl>EditProductStore?productStoreId=${productStorePromoAppl.productStoreId}</@ofbizUrl>" class="buttontext"><#if productStore?exists>${(productStore.storeName)?if_exists}</#if>[${productStorePromoAppl.productStoreId}]</a></td> <#assign hasntStarted = false> Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/reviews/pendingReviews.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/reviews/pendingReviews.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/reviews/pendingReviews.ftl (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/reviews/pendingReviews.ftl Tue Jun 19 21:36:11 2012 @@ -57,14 +57,14 @@ under the License. <#assign rowClass = "2"> <#list pendingReviews as review> <#if review.userLoginId?has_content> - <#assign postedUserLogin = review.getRelatedOne("UserLogin")> + <#assign postedUserLogin = review.getRelatedOne("UserLogin", false)> <#if postedUserLogin.partyId?has_content> - <#assign party = postedUserLogin.getRelatedOne("Party")> + <#assign party = postedUserLogin.getRelatedOne("Party", false)> <#assign partyTypeId = party.get("partyTypeId")> <#if partyTypeId == "PERSON"> - <#assign postedPerson = postedUserLogin.getRelatedOne("Person")> + <#assign postedPerson = postedUserLogin.getRelatedOne("Person", false)> <#else> - <#assign postedPerson = postedUserLogin.getRelatedOne("PartyGroup")> + <#assign postedPerson = postedUserLogin.getRelatedOne("PartyGroup", false)> </#if> </#if> </#if> @@ -94,11 +94,11 @@ under the License. <option value="Y">${uiLabelMap.CommonY}</option> </select> </td> - <td>${review.getRelatedOne("Product").internalName?if_exists}<br /><a class="buttontext" href="<@ofbizUrl>EditProduct?productId=${review.productId}</@ofbizUrl>">${review.productId}</a></td> + <td>${review.getRelatedOne("Product", false).internalName?if_exists}<br /><a class="buttontext" href="<@ofbizUrl>EditProduct?productId=${review.productId}</@ofbizUrl>">${review.productId}</a></td> <td> <input type="text" size='3' name="productRating_o_${rowCount}" value="${review.productRating?if_exists?string}" /> </td> - <td>${review.getRelatedOne("StatusItem").get("description", locale)}</td> + <td>${review.getRelatedOne("StatusItem", false).get("description", locale)}</td> <td> <textarea name="productReview_o_${rowCount}" rows="5" cols="30" wrap="hard">${review.productReview?if_exists}</textarea> </td> Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/store/EditProductStoreSurveys.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/store/EditProductStoreSurveys.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/store/EditProductStoreSurveys.ftl (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/store/EditProductStoreSurveys.ftl Tue Jun 19 21:36:11 2012 @@ -34,8 +34,8 @@ under the License. </tr> <#assign alt_row = false> <#list productStoreSurveys as storeSurvey> - <#assign surveyType = storeSurvey.getRelatedOne("SurveyApplType")> - <#assign survey = storeSurvey.getRelatedOne("Survey")> + <#assign surveyType = storeSurvey.getRelatedOne("SurveyApplType", false)> + <#assign survey = storeSurvey.getRelatedOne("Survey", false)> <tr valign="middle"<#if alt_row>class="alternate-row"</#if>> <td>${surveyType.get("description",locale)}</td> <td>${storeSurvey.groupName?if_exists}</td> Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/thesaurus/EditKeywordThesaurus.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/thesaurus/EditKeywordThesaurus.ftl?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/thesaurus/EditKeywordThesaurus.ftl (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/catalog/thesaurus/EditKeywordThesaurus.ftl Tue Jun 19 21:36:11 2012 @@ -45,7 +45,7 @@ under the License. <table cellspacing="0" class="basic-table"> <#assign rowClass = "2"> <#list keywordThesauruses as keyword> - <#assign relationship = keyword.getRelatedOneCache("RelationshipEnumeration")> + <#assign relationship = keyword.getRelatedOne("RelationshipEnumeration", true)> <#if keyword.enteredKeyword == lastkeyword><#assign sameRow=true><#else><#assign lastkeyword=keyword.enteredKeyword><#assign sameRow=false></#if> <#if sameRow == false> <#if (keyword_index > 0)> Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/facility/EditFacility.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/facility/EditFacility.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/facility/EditFacility.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/facility/EditFacility.groovy Tue Jun 19 21:36:11 2012 @@ -28,7 +28,7 @@ if (!facility) { facility = delegator.makeValue("Facility"); facilityType = delegator.makeValue("FacilityType"); } else { - facilityType = facility.getRelatedOne("FacilityType"); + facilityType = facility.getRelatedOne("FacilityType", false); } context.facility = facility; context.facilityType = facilityType; Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/facility/EditFacilityLocation.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/facility/EditFacilityLocation.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/facility/EditFacilityLocation.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/facility/EditFacilityLocation.groovy Tue Jun 19 21:36:11 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/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/facility/ViewContactMechs.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/facility/ViewContactMechs.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/facility/ViewContactMechs.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/facility/ViewContactMechs.groovy Tue Jun 19 21:36:11 2012 @@ -29,7 +29,7 @@ if (!facility) { context.facility = delegator.makeValue("Facility", null); context.facilityType = delegator.makeValue("FacilityType", null); } else { - facilityType = facility.getRelatedOne("FacilityType"); + facilityType = facility.getRelatedOne("FacilityType", false); } context.facility = facility; context.facilityType = facilityType; Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryItemTotals.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryItemTotals.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryItemTotals.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryItemTotals.groovy Tue Jun 19 21:36:11 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/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/inventory/PhysicalInventoryVariance.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/inventory/PhysicalInventoryVariance.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/inventory/PhysicalInventoryVariance.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/inventory/PhysicalInventoryVariance.groovy Tue Jun 19 21:36:11 2012 @@ -28,9 +28,9 @@ if (inventoryItem && "NON_SERIAL_INV_ITE physicalInventoryAndVarianceDatas.add(physicalInventoryAndVarianceData); physicalInventoryAndVarianceData.physicalInventoryAndVariance = physicalInventoryAndVariance; - physicalInventoryAndVarianceData.varianceReason = physicalInventoryAndVariance.getRelatedOneCache("VarianceReason"); - physicalInventoryAndVarianceData.person = physicalInventoryAndVariance.getRelatedOne("Person"); - physicalInventoryAndVarianceData.partyGroup = physicalInventoryAndVariance.getRelatedOne("PartyGroup"); + physicalInventoryAndVarianceData.varianceReason = physicalInventoryAndVariance.getRelatedOne("VarianceReason", true); + physicalInventoryAndVarianceData.person = physicalInventoryAndVariance.getRelatedOne("Person", false); + physicalInventoryAndVarianceData.partyGroup = physicalInventoryAndVariance.getRelatedOne("PartyGroup", false); } context.physicalInventoryAndVarianceDatas = physicalInventoryAndVarianceDatas; } Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/inventory/ReceiveInventory.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/inventory/ReceiveInventory.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/inventory/ReceiveInventory.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/inventory/ReceiveInventory.groovy Tue Jun 19 21:36:11 2012 @@ -39,7 +39,7 @@ if (facilityId) { ownerAcctgPref = null; if (facility) { - owner = facility.getRelatedOne("OwnerParty"); + owner = facility.getRelatedOne("OwnerParty", false); if (owner) { result = dispatcher.runSync("getPartyAccountingPreferences", [organizationPartyId : owner.partyId, userLogin : request.getAttribute("userLogin")]); if (!ServiceUtil.isError(result) && result.partyAccountingPreference) { @@ -68,7 +68,7 @@ if (purchaseOrder && !shipmentId) { if (orderShipments) { shipments = [] as TreeSet; orderShipments.each { orderShipment -> - shipment = orderShipment.getRelatedOne("Shipment"); + shipment = orderShipment.getRelatedOne("Shipment", false); if (!"PURCH_SHIP_RECEIVED".equals(shipment.statusId) && !"SHIPMENT_CANCELLED".equals(shipment.statusId) && (!shipment.destinationFacilityId || facilityId.equals(shipment.destinationFacilityId))) { @@ -81,7 +81,7 @@ if (purchaseOrder && !shipmentId) { if (issuances) { shipments = [] as TreeSet; issuances.each { issuance -> - shipment = issuance.getRelatedOne("Shipment"); + shipment = issuance.getRelatedOne("Shipment", false); if (!"PURCH_SHIP_RECEIVED".equals(shipment.statusId) && !"SHIPMENT_CANCELLED".equals(shipment.statusId) && (!shipment.destinationFacilityId || facilityId.equals(shipment.destinationFacilityId))) { @@ -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/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/inventory/TransferInventoryItem.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/inventory/TransferInventoryItem.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/inventory/TransferInventoryItem.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/inventory/TransferInventoryItem.groovy Tue Jun 19 21:36:11 2012 @@ -60,13 +60,13 @@ if (inventoryItemId) { } if (inventoryItem) { context.inventoryItem = inventoryItem; - inventoryItemType = inventoryItem.getRelatedOne("InventoryItemType"); + inventoryItemType = inventoryItem.getRelatedOne("InventoryItemType", false); if (inventoryItemType) { context.inventoryItemType = inventoryItemType; } if (inventoryItem.statusId) { - inventoryStatus = inventoryItem.getRelatedOne("StatusItem"); + inventoryStatus = inventoryItem.getRelatedOne("StatusItem", false); if (inventoryStatus) { context.inventoryStatus = inventoryStatus; } Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/returns/ReceiveReturn.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/returns/ReceiveReturn.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/returns/ReceiveReturn.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/returns/ReceiveReturn.groovy Tue Jun 19 21:36:11 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/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/AddItemsFromInventory.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/AddItemsFromInventory.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/AddItemsFromInventory.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/AddItemsFromInventory.groovy Tue Jun 19 21:36:11 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/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/AddItemsFromOrder.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/AddItemsFromOrder.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/AddItemsFromOrder.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/AddItemsFromOrder.groovy Tue Jun 19 21:36:11 2012 @@ -29,8 +29,8 @@ selectFromShipmentPlan = request.getPara shipment = delegator.findOne("Shipment", [shipmentId : shipmentId], false); if (shipment) { - context.originFacility = shipment.getRelatedOne("OriginFacility"); - context.destinationFacility = shipment.getRelatedOne("DestinationFacility"); + context.originFacility = shipment.getRelatedOne("OriginFacility", false); + context.destinationFacility = shipment.getRelatedOne("DestinationFacility", false); } if (!orderId && shipment && !selectFromShipmentPlan) { @@ -45,8 +45,8 @@ if (orderId && shipment) { context.orderHeader = orderHeader; if (orderHeader) { - context.orderHeaderStatus = orderHeader.getRelatedOne("StatusItem"); - context.orderType = orderHeader.getRelatedOne("OrderType"); + context.orderHeaderStatus = orderHeader.getRelatedOne("StatusItem", false); + context.orderType = orderHeader.getRelatedOne("OrderType", false); isSalesOrder = "SALES_ORDER".equals(orderHeader.orderTypeId); context.isSalesOrder = isSalesOrder; @@ -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"); + 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,15 +83,15 @@ 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 -> - inventoryItem = orderItemShipGrpInvRes.getRelatedOne("InventoryItem"); + inventoryItem = orderItemShipGrpInvRes.getRelatedOne("InventoryItem", false); orderItemShipGrpInvResData = [:]; orderItemShipGrpInvResData.orderItemShipGrpInvRes = orderItemShipGrpInvRes; orderItemShipGrpInvResData.inventoryItem = inventoryItem; - orderItemShipGrpInvResData.inventoryItemFacility = inventoryItem.getRelatedOne("Facility"); + orderItemShipGrpInvResData.inventoryItemFacility = inventoryItem.getRelatedOne("Facility", false); orderItemShipGrpInvResDatas.add(orderItemShipGrpInvResData); if (orderItemShipGrpInvRes.quantity) { @@ -120,7 +120,7 @@ if (shipment && selectFromShipmentPlan) context.isSalesOrder = true; shipmentPlans.each { shipmentPlan -> orderItemData = [:]; - orderItem = shipmentPlan.getRelatedOne("OrderItem"); + orderItem = shipmentPlan.getRelatedOne("OrderItem", false); orderItemShipGroup = null; if (shipGroupSeqId) { @@ -134,16 +134,16 @@ if (shipment && selectFromShipmentPlan) } orderItemShipGroupAssoc = null; - orderItemShipGroupAssocs = orderItem.getRelatedByAnd("OrderItemShipGroupAssoc", oiasgaLimitMap); + orderItemShipGroupAssocs = orderItem.getRelated("OrderItemShipGroupAssoc", oiasgaLimitMap, null, false); if (orderItemShipGroupAssocs) { orderItemShipGroupAssoc = EntityUtil.getFirst(orderItemShipGroupAssocs); } plannedQuantity = shipmentPlan.getDouble("quantity"); totalProposedQuantity = 0.0; - product = orderItem.getRelatedOne("Product"); + product = orderItem.getRelatedOne("Product", false); - itemIssuances = orderItem.getRelated("ItemIssuance"); + itemIssuances = orderItem.getRelated("ItemIssuance", null, null, false); totalQuantityIssued = 0; totalQuantityIssuedInShipment = 0; itemIssuances.each { itemIssuance -> @@ -161,15 +161,15 @@ if (shipment && selectFromShipmentPlan) } } - orderItemShipGrpInvResList = orderItem.getRelated("OrderItemShipGrpInvRes", null, ['reservedDatetime']); + orderItemShipGrpInvResList = orderItem.getRelated("OrderItemShipGrpInvRes", null, ['reservedDatetime'], false); orderItemShipGrpInvResDatas = [] as LinkedList; totalQuantityReserved = 0; orderItemShipGrpInvResList.each { orderItemShipGrpInvRes -> - inventoryItem = orderItemShipGrpInvRes.getRelatedOne("InventoryItem"); + inventoryItem = orderItemShipGrpInvRes.getRelatedOne("InventoryItem", false); orderItemShipGrpInvResData = [:]; orderItemShipGrpInvResData.orderItemShipGrpInvRes = orderItemShipGrpInvRes; orderItemShipGrpInvResData.inventoryItem = inventoryItem; - orderItemShipGrpInvResData.inventoryItemFacility = inventoryItem.getRelatedOne("Facility"); + orderItemShipGrpInvResData.inventoryItemFacility = inventoryItem.getRelatedOne("Facility", false); orderItemShipGrpInvResDatas.add(orderItemShipGrpInvResData); reservedQuantity = 0.0; Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipment.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipment.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipment.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipment.groovy Tue Jun 19 21:36:11 2012 @@ -42,11 +42,11 @@ context.shipmentId = shipmentId; context.shipment = shipment; if (shipment) { - currentStatus = shipment.getRelatedOne("StatusItem"); - originPostalAddress = shipment.getRelatedOne("OriginPostalAddress"); - destinationPostalAddress = shipment.getRelatedOne("DestinationPostalAddress"); - originTelecomNumber = shipment.getRelatedOne("OriginTelecomNumber"); - destinationTelecomNumber = shipment.getRelatedOne("DestinationTelecomNumber"); + currentStatus = shipment.getRelatedOne("StatusItem", false); + originPostalAddress = shipment.getRelatedOne("OriginPostalAddress", false); + destinationPostalAddress = shipment.getRelatedOne("DestinationPostalAddress", false); + originTelecomNumber = shipment.getRelatedOne("OriginTelecomNumber", false); + destinationTelecomNumber = shipment.getRelatedOne("DestinationTelecomNumber", false); if (orderHeader) { context.productStoreId = orderHeader.productStoreId; Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentItems.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentItems.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentItems.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentItems.groovy Tue Jun 19 21:36:11 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.product = shipmentItem.getRelatedOne("Product"); + 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/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentPackages.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentPackages.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentPackages.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentPackages.groovy Tue Jun 19 21:36:11 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.weightUom = shipmentPackage.getRelatedOne("WeightUom"); + 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/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentPlan.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentPlan.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentPlan.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentPlan.groovy Tue Jun 19 21:36:11 2012 @@ -64,8 +64,8 @@ if (shipment) { if (shipmentPlans) { shipmentPlans.each { shipmentPlan -> oneRow = new HashMap(shipmentPlan); - // oneRow.putAll(shipmentPlan.getRelatedOne("OrderItemShipGrpInvRes")); - orderItem = shipmentPlan.getRelatedOne("OrderItem"); + // oneRow.putAll(shipmentPlan.getRelatedOne("OrderItemShipGrpInvRes", false)); + orderItem = shipmentPlan.getRelatedOne("OrderItem", false); oneRow.productId = orderItem.productId; orderedQuantity = orderItem.getDouble("quantity"); canceledQuantity = orderItem.getDouble("cancelQuantity"); @@ -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"); @@ -147,7 +147,7 @@ if (shipmentPlans) { oneRow.notAvailableQuantity = reservedNotAvailable; // Planned Weight and Volume - product = orderItem.getRelatedOne("Product"); + product = orderItem.getRelatedOne("Product", false); weight = 0.0; quantity = 0.0; if (shipmentPlan.getDouble("quantity")) { @@ -190,7 +190,7 @@ if (shipmentPlans) { addRows = [] as ArrayList; if (orderItemShipGroupAssocs) { orderItemShipGroupAssocs.each { orderItemShipGroupAssoc -> - orderItem = orderItemShipGroupAssoc.getRelatedOne("OrderItem"); + orderItem = orderItemShipGroupAssoc.getRelatedOne("OrderItem", false); oneRow = [:]; oneRow.shipmentId = shipmentId; oneRow.orderId = orderItemShipGroupAssoc.orderId; @@ -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"); @@ -250,7 +250,7 @@ if (orderItemShipGroupAssocs) { // Planned (unitary) Weight and Volume weight = new Double(0); - product = orderItem.getRelatedOne("Product"); + product = orderItem.getRelatedOne("Product", false); if (product.getDouble("weight")) { weight = product.getDouble("weight"); } Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentRouteSegments.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentRouteSegments.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentRouteSegments.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/EditShipmentRouteSegments.groovy Tue Jun 19 21:36:11 2012 @@ -31,25 +31,25 @@ 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 -> shipmentRouteSegmentData = [:]; shipmentRouteSegmentData.shipmentRouteSegment = shipmentRouteSegment; - shipmentRouteSegmentData.originFacility = shipmentRouteSegment.getRelatedOne("OriginFacility"); - shipmentRouteSegmentData.destFacility = shipmentRouteSegment.getRelatedOne("DestFacility"); - shipmentRouteSegmentData.originPostalAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress"); - shipmentRouteSegmentData.originTelecomNumber = shipmentRouteSegment.getRelatedOne("OriginTelecomNumber"); - shipmentRouteSegmentData.destPostalAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress"); - shipmentRouteSegmentData.destTelecomNumber = shipmentRouteSegment.getRelatedOne("DestTelecomNumber"); - shipmentRouteSegmentData.shipmentMethodType = shipmentRouteSegment.getRelatedOne("ShipmentMethodType"); - shipmentRouteSegmentData.carrierPerson = shipmentRouteSegment.getRelatedOne("CarrierPerson"); - shipmentRouteSegmentData.carrierPartyGroup = shipmentRouteSegment.getRelatedOne("CarrierPartyGroup"); - shipmentRouteSegmentData.shipmentPackageRouteSegs = shipmentRouteSegment.getRelated("ShipmentPackageRouteSeg"); - shipmentRouteSegmentData.carrierServiceStatusItem = shipmentRouteSegment.getRelatedOne("CarrierServiceStatusItem"); - shipmentRouteSegmentData.currencyUom = shipmentRouteSegment.getRelatedOne("CurrencyUom"); - shipmentRouteSegmentData.billingWeightUom = shipmentRouteSegment.getRelatedOne("BillingWeightUom"); + shipmentRouteSegmentData.originFacility = shipmentRouteSegment.getRelatedOne("OriginFacility", false); + shipmentRouteSegmentData.destFacility = shipmentRouteSegment.getRelatedOne("DestFacility", false); + shipmentRouteSegmentData.originPostalAddress = shipmentRouteSegment.getRelatedOne("OriginPostalAddress", false); + shipmentRouteSegmentData.originTelecomNumber = shipmentRouteSegment.getRelatedOne("OriginTelecomNumber", false); + shipmentRouteSegmentData.destPostalAddress = shipmentRouteSegment.getRelatedOne("DestPostalAddress", false); + shipmentRouteSegmentData.destTelecomNumber = shipmentRouteSegment.getRelatedOne("DestTelecomNumber", false); + shipmentRouteSegmentData.shipmentMethodType = shipmentRouteSegment.getRelatedOne("ShipmentMethodType", false); + shipmentRouteSegmentData.carrierPerson = shipmentRouteSegment.getRelatedOne("CarrierPerson", false); + shipmentRouteSegmentData.carrierPartyGroup = shipmentRouteSegment.getRelatedOne("CarrierPartyGroup", false); + 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); if (shipmentRouteSegment.carrierServiceStatusId) { shipmentRouteSegmentData.carrierServiceStatusValidChangeToDetails = delegator.findList("StatusValidChangeToDetail", EntityCondition.makeCondition([statusId : shipmentRouteSegment.carrierServiceStatusId]), null, ['sequenceId'], null, false); } else { @@ -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); @@ -68,11 +68,11 @@ if (shipment) { carrierPartyRoles = delegator.findList("PartyRole", EntityCondition.makeCondition([roleTypeId : 'CARRIER']), null, null, null, false); carrierPartyDatas = [] as LinkedList; carrierPartyRoles.each { carrierPartyRole -> - party = carrierPartyRole.getRelatedOne("Party"); + party = carrierPartyRole.getRelatedOne("Party", false); carrierPartyData = [:]; carrierPartyData.party = party; - carrierPartyData.person = party.getRelatedOne("Person"); - carrierPartyData.partyGroup = party.getRelatedOne("PartyGroup"); + carrierPartyData.person = party.getRelatedOne("Person", false); + carrierPartyData.partyGroup = party.getRelatedOne("PartyGroup", false); carrierPartyDatas.add(carrierPartyData); } Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy Tue Jun 19 21:36:11 2012 @@ -98,8 +98,8 @@ if (picklistBinId) { if (bin) { orderId = bin.primaryOrderId; shipGroupSeqId = bin.primaryShipGroupSeqId; - packSession.addItemInfo(bin.getRelatedByAnd("PicklistItem", [itemStatusId : 'PICKITEM_PENDING'])); - //context.put("picklistItemInfos", bin.getRelatedByAnd("PicklistItem", UtilMisc.toMap("itemStatusId", "PICKITEM_PENDING"))); + packSession.addItemInfo(bin.getRelated("PicklistItem", [itemStatusId : 'PICKITEM_PENDING'], null, false)); + //context.put("picklistItemInfos", bin.getRelated("PicklistItem", UtilMisc.toMap("itemStatusId", "PICKITEM_PENDING"), null, false)); } } else { picklistBinId = null; Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/PackingSlip.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/PackingSlip.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/PackingSlip.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/PackingSlip.groovy Tue Jun 19 21:36:11 2012 @@ -30,12 +30,12 @@ if (!shipment) { } // get the packages related to this shipment in order of packages -shipmentPackages = shipment.getRelated("ShipmentPackage", ['shipmentPackageSeqId']); +shipmentPackages = shipment.getRelated("ShipmentPackage", null, ['shipmentPackageSeqId'], false); // first we scan the shipment items and count the quantity of each product that is being shipped quantityShippedByProduct = [:]; quantityInShipmentByProduct = [:]; -shipmentItems = shipment.getRelated("ShipmentItem"); +shipmentItems = shipment.getRelated("ShipmentItem", null, null, false); shipmentItems.each { shipmentItem -> productId = shipmentItem.productId; shipped = quantityShippedByProduct.get(productId); @@ -60,7 +60,7 @@ previousShipmentIter = delegator.find("S while (previousShipmentItem = previousShipmentIter.next()) { if (!previousShipmentItem.shipmentId.equals(shipment.shipmentId)) { - previousShipmentItems = previousShipmentItem.getRelated("ShipmentItem"); + previousShipmentItems = previousShipmentItem.getRelated("ShipmentItem", null, null, false); previousShipmentItems.each { shipmentItem -> productId = shipmentItem.productId; shipped = quantityShippedByProduct.get(productId); @@ -77,10 +77,10 @@ previousShipmentIter.close(); // next scan the order items (via issuances) to count the quantity of each product requested quantityRequestedByProduct = [:]; countedOrderItems = [:]; // this map is only used to keep track of the order items already counted -order = shipment.getRelatedOne("PrimaryOrderHeader"); -issuances = order.getRelated("ItemIssuance"); +order = shipment.getRelatedOne("PrimaryOrderHeader", false); +issuances = order.getRelated("ItemIssuance", null, null, false); issuances.each { issuance -> - orderItem = issuance.getRelatedOne("OrderItem"); + orderItem = issuance.getRelatedOne("OrderItem", false); productId = orderItem.productId; if (!countedOrderItems.containsKey(orderItem.orderId + orderItem.orderItemSeqId)) { countedOrderItems.put(orderItem.orderId + orderItem.orderItemSeqId, null); @@ -98,13 +98,13 @@ issuances.each { issuance -> // for each package, we want to list the quantities and details of each product packages = []; // note we assume that the package number is simply the index + 1 of this list shipmentPackages.each { shipmentPackage -> - contents = shipmentPackage.getRelated("ShipmentPackageContent", ['shipmentItemSeqId']); + contents = shipmentPackage.getRelated("ShipmentPackageContent", null, ['shipmentItemSeqId'], false); // each line is one logical Product and the quantities associated with it lines = []; contents.each { content -> - shipmentItem = content.getRelatedOne("ShipmentItem"); - product = shipmentItem.getRelatedOne("Product"); + shipmentItem = content.getRelatedOne("ShipmentItem", false); + product = shipmentItem.getRelatedOne("Product", false); productTypeId = product.get("productTypeId"); line = [:]; Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/PrintPickSheets.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/PrintPickSheets.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/PrintPickSheets.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/PrintPickSheets.groovy Tue Jun 19 21:36:11 2012 @@ -68,7 +68,7 @@ if (toPrintOrders) { shippingAddress = delegator.findOne("PostalAddress", [contactMechId : shippingContactMechId], false); orderItemShipGroups.each { orderItemShipGroup -> if (orderItemShipGroup.orderId == orderId) { - orderMap.shipmentMethodType = EntityUtil.getFirst(orderItemShipGroup.getRelated("ShipmentMethodType")).description; + orderMap.shipmentMethodType = EntityUtil.getFirst(orderItemShipGroup.getRelated("ShipmentMethodType", null, null, false)).description; orderMap.carrierPartyId = orderItemShipGroup.carrierPartyId; orderMap.shipGroupSeqId = orderItemShipGroup.shipGroupSeqId; orderMap.carrierPartyId = orderItemShipGroup.carrierPartyId; Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/QuickShipOrder.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/QuickShipOrder.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/QuickShipOrder.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/QuickShipOrder.groovy Tue Jun 19 21:36:11 2012 @@ -48,19 +48,19 @@ if (shipmentId) { request.setAttribute("_EVENT_MESSAGE_", null); // set the shipment context info - context.shipmentType = shipment.getRelatedOneCache("ShipmentType"); - context.statusItem = shipment.getRelatedOne("StatusItem"); - context.primaryOrderHeader = shipment.getRelatedOne("PrimaryOrderHeader"); - context.toPerson = shipment.getRelatedOne("ToPerson"); - context.toPartyGroup = shipment.getRelatedOne("ToPartyGroup"); - context.fromPerson = shipment.getRelatedOne("FromPerson"); - context.fromPartyGroup = shipment.getRelatedOne("FromPartyGroup"); - context.originFacility = shipment.getRelatedOne("OriginFacility"); - context.destinationFacility = shipment.getRelatedOne("DestinationFacility"); - context.originPostalAddress = shipment.getRelatedOne("OriginPostalAddress"); - context.destinationPostalAddress = shipment.getRelatedOne("DestinationPostalAddress"); - context.shipmentPackages = shipment.getRelated("ShipmentPackage", null, ['shipmentPackageSeqId']); - context.shipmentRoutes = shipment.getRelated("ShipmentRouteSegment", null, ['shipmentRouteSegmentId']); + context.shipmentType = shipment.getRelatedOne("ShipmentType", true); + context.statusItem = shipment.getRelatedOne("StatusItem", false); + context.primaryOrderHeader = shipment.getRelatedOne("PrimaryOrderHeader", false); + context.toPerson = shipment.getRelatedOne("ToPerson", false); + context.toPartyGroup = shipment.getRelatedOne("ToPartyGroup", false); + context.fromPerson = shipment.getRelatedOne("FromPerson", false); + context.fromPartyGroup = shipment.getRelatedOne("FromPartyGroup", false); + context.originFacility = shipment.getRelatedOne("OriginFacility", false); + context.destinationFacility = shipment.getRelatedOne("DestinationFacility", false); + context.originPostalAddress = shipment.getRelatedOne("OriginPostalAddress", false); + context.destinationPostalAddress = shipment.getRelatedOne("DestinationPostalAddress", false); + context.shipmentPackages = shipment.getRelated("ShipmentPackage", null, ['shipmentPackageSeqId'], false); + context.shipmentRoutes = shipment.getRelated("ShipmentRouteSegment", null, ['shipmentRouteSegmentId'], false); context.shipment = shipment; context.shipmentId = shipmentId; Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/ReceiveInventoryAgainstPurchaseOrder.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/ReceiveInventoryAgainstPurchaseOrder.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/ReceiveInventoryAgainstPurchaseOrder.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/ReceiveInventoryAgainstPurchaseOrder.groovy Tue Jun 19 21:36:11 2012 @@ -55,7 +55,7 @@ if (!isPurchaseShipment) { return; } -facility = shipment.getRelatedOne("DestinationFacility"); +facility = shipment.getRelatedOne("DestinationFacility", false); context.facility = facility; context.facilityId = shipment.destinationFacilityId; context.now = UtilDateTime.nowTimestamp(); @@ -87,7 +87,7 @@ if (!isPurchaseOrder) { // Get the base currency from the facility owner, for currency conversions baseCurrencyUomId = null; if (facility) { - owner = facility.getRelatedOne("OwnerParty"); + owner = facility.getRelatedOne("OwnerParty", false); if (owner) { result = dispatcher.runSync("getPartyAccountingPreferences", [organizationPartyId : owner.partyId, userLogin : request.getAttribute("userLogin")]); if (!ServiceUtil.isError(result) && result.partyAccountingPreference) { @@ -116,9 +116,9 @@ orderItemDatas = [:] as TreeMap; totalAvailableToReceive = 0; // Populate the order item data for the FTL -orderItems = orderHeader.getRelated("OrderItemAndShipGroupAssoc", oiasgaLimitMap, ['shipGroupSeqId', 'orderItemSeqId']); +orderItems = orderHeader.getRelated("OrderItemAndShipGroupAssoc", oiasgaLimitMap, ['shipGroupSeqId', 'orderItemSeqId'], false); orderItems.each { orderItemAndShipGroupAssoc -> - product = orderItemAndShipGroupAssoc.getRelatedOne("Product"); + product = orderItemAndShipGroupAssoc.getRelatedOne("Product", false); // Get the order item, since the orderItemAndShipGroupAssoc's quantity field is manipulated in some cases orderItem = delegator.findOne("OrderItem", [orderId : orderId, orderItemSeqId : orderItemAndShipGroupAssoc.orderItemSeqId], false); Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/ShipmentManifest.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/ShipmentManifest.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/ShipmentManifest.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/ShipmentManifest.groovy Tue Jun 19 21:36:11 2012 @@ -25,21 +25,21 @@ shipmentId = request.getParameter("shipm shipment = delegator.findOne("Shipment", [shipmentId : shipmentId], false); if (shipment) { - shipmentPackageRouteSegs = shipment.getRelated("ShipmentPackageRouteSeg", null, ['shipmentRouteSegmentId', 'shipmentPackageSeqId']); + shipmentPackageRouteSegs = shipment.getRelated("ShipmentPackageRouteSeg", null, ['shipmentRouteSegmentId', 'shipmentPackageSeqId'], false); shipmentPackageDatas = [] as LinkedList; if (shipmentPackageRouteSegs) { shipmentPackageRouteSegs.each { shipmentPackageRouteSeg -> - shipmentPackages = shipmentPackageRouteSeg.getRelated("ShipmentPackage", null, ['shipmentPackageSeqId']); - shipmentRouteSegment = shipmentPackageRouteSeg.getRelatedOne("ShipmentRouteSegment"); + shipmentPackages = shipmentPackageRouteSeg.getRelated("ShipmentPackage", null, ['shipmentPackageSeqId'], false); + shipmentRouteSegment = shipmentPackageRouteSeg.getRelatedOne("ShipmentRouteSegment", false); if (shipmentPackages) { shipmentPackages.each { shipmentPackage -> shipmentItemsDatas = [] as LinkedList; - shipmentPackageContents = shipmentPackage.getRelated("ShipmentPackageContent", null, ['shipmentItemSeqId']); + shipmentPackageContents = shipmentPackage.getRelated("ShipmentPackageContent", null, ['shipmentItemSeqId'], false); if (shipmentPackageContents) { shipmentPackageContents.each { shipmentPackageContent -> shipmentItemsData = [:]; packageQuantity = shipmentPackageContent.getDouble("quantity"); - shipmentItem = shipmentPackageContent.getRelatedOne("ShipmentItem"); + shipmentItem = shipmentPackageContent.getRelatedOne("ShipmentItem", false); if (shipmentItem) { shippedQuantity = shipmentItem.getDouble("quantity"); shipmentItemsData.shipmentItem = shipmentItem; Modified: ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/VerifyPick.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/VerifyPick.groovy?rev=1351866&r1=1351865&r2=1351866&view=diff ============================================================================== --- ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/VerifyPick.groovy (original) +++ ofbiz/branches/20120329_portletWidget/applications/product/webapp/facility/WEB-INF/actions/shipment/VerifyPick.groovy Tue Jun 19 21:36:11 2012 @@ -41,7 +41,7 @@ if (shipmentId) { context.orderId = null; shipment = delegator.findOne("Shipment", [shipmentId : shipmentId], false); if (shipment) { - shipmentItemBillingList = shipment.getRelated("ShipmentItemBilling"); + shipmentItemBillingList = shipment.getRelated("ShipmentItemBilling", null, null, false); invoiceIds = EntityUtil.getFieldListFromEntityList(shipmentItemBillingList, "invoiceId", true); if (invoiceIds) { context.invoiceIds = invoiceIds; |
| Free forum by Nabble | Edit this page |
