You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2012/05/29 06:12:27 UTC
svn commit: r1343483 - in /ofbiz/trunk/applications/manufacturing:
src/org/ofbiz/manufacturing/bom/ src/org/ofbiz/manufacturing/jobshopmgt/
src/org/ofbiz/manufacturing/mrp/ src/org/ofbiz/manufacturing/techdata/
webapp/manufacturing/WEB-INF/actions/jobs...
Author: doogie
Date: Tue May 29 04:12:26 2012
New Revision: 1343483
URL: http://svn.apache.org/viewvc?rev=1343483&view=rev
Log:
DEPRECATION: applications/manufacturing: getRelatedOne variants replaced with a getRelatedOne variant that takes a boolean useCache parameter.
Modified:
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMHelper.java
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMServices.java
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRun.java
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunHelper.java
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/ProposedOrder.java
ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/WorkWithShipmentPlans.groovy
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PackageContentsAndOrder.groovy
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentLabel.groovy
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentWorkEffortTasks.groovy
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/routing/EditCalendarExceptionWeek.groovy
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/bom/EditProductBom.ftl
ofbiz/trunk/applications/manufacturing/webapp/manufacturing/mrp/findInventoryEventPlan.ftl
Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMHelper.java?rev=1343483&r1=1343482&r2=1343483&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMHelper.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMHelper.java Tue May 29 04:12:26 2012
@@ -137,7 +137,7 @@ public class BOMHelper {
try {
List<GenericValue> shipmentPlans = delegator.findByAnd("OrderShipment", UtilMisc.toMap("shipmentId", shipmentId), null, false);
for(GenericValue shipmentPlan : shipmentPlans) {
- GenericValue orderItem = shipmentPlan.getRelatedOne("OrderItem");
+ GenericValue orderItem = shipmentPlan.getRelatedOne("OrderItem", false);
List<GenericValue> productionRuns = delegator.findByAnd("WorkOrderItemFulfillment", UtilMisc.toMap("orderId", shipmentPlan.getString("orderId"), "orderItemSeqId", shipmentPlan.getString("orderItemSeqId"), "shipGroupSeqId", shipmentPlan.getString("shipGroupSeqId")), null, true);
if (UtilValidate.isNotEmpty(productionRuns)) {
Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java?rev=1343483&r1=1343482&r2=1343483&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java Tue May 29 04:12:26 2012
@@ -409,7 +409,7 @@ public class BOMNode {
String serviceName = null;
if (this.productAssoc != null && this.productAssoc.getString("estimateCalcMethod") != null) {
try {
- GenericValue genericService = productAssoc.getRelatedOne("CustomMethod");
+ GenericValue genericService = productAssoc.getRelatedOne("CustomMethod", false);
if (genericService != null && genericService.getString("customMethodName") != null) {
serviceName = genericService.getString("customMethodName");
}
Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMServices.java?rev=1343483&r1=1343482&r2=1343483&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMServices.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMServices.java Tue May 29 04:12:26 2012
@@ -596,7 +596,7 @@ public class BOMServices {
GenericValue orderItem = orderReadHelper.getOrderItem(orderShipment.getString("orderItemSeqId"));
GenericValue product = null;
try {
- product = orderItem.getRelatedOne("Product");
+ product = orderItem.getRelatedOne("Product", false);
} catch (GenericEntityException e) {
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingPackageConfiguratorError", locale));
}
@@ -650,7 +650,7 @@ public class BOMServices {
// single package
GenericValue orderItem = orderReadHelper.getOrderItem(orderShipment.getString("orderItemSeqId"));
try {
- product = orderItem.getRelatedOne("Product");
+ product = orderItem.getRelatedOne("Product", false);
} catch (GenericEntityException e) {
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingPackageConfiguratorError", locale));
}
Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRun.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRun.java?rev=1343483&r1=1343482&r2=1343483&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRun.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRun.java Tue May 29 04:12:26 2012
@@ -168,7 +168,7 @@ public class ProductionRun {
List<GenericValue> productionRunProducts = productionRun.getRelated("WorkEffortGoodStandard", UtilMisc.toMap("workEffortGoodStdTypeId", "PRUN_PROD_DELIV"), null);
this.productionRunProduct = EntityUtil.getFirst(productionRunProducts);
quantity = productionRunProduct.getBigDecimal("estimatedQuantity");
- productProduced = productionRunProduct.getRelatedOneCache("Product");
+ productProduced = productionRunProduct.getRelatedOne("Product", true);
} catch (GenericEntityException e) {
Debug.logWarning(e.getMessage(), module);
}
@@ -309,7 +309,7 @@ public class ProductionRun {
if (exist()) {
if (currentStatus == null) {
try {
- currentStatus = productionRun.getRelatedOneCache("StatusItem");
+ currentStatus = productionRun.getRelatedOne("StatusItem", true);
} catch (GenericEntityException e) {
Debug.logWarning(e.getMessage(), module);
}
@@ -413,7 +413,7 @@ public class ProductionRun {
if (task.get("estimateCalcMethod") != null) {
String serviceName = null;
try {
- GenericValue genericService = task.getRelatedOne("CustomMethod");
+ GenericValue genericService = task.getRelatedOne("CustomMethod", false);
if (genericService != null && genericService.getString("customMethodName") != null) {
serviceName = genericService.getString("customMethodName");
// call the service
Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunHelper.java?rev=1343483&r1=1343482&r2=1343483&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunHelper.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunHelper.java Tue May 29 04:12:26 2012
@@ -61,7 +61,7 @@ public class ProductionRunHelper {
if (productionRun != null) {
List<GenericValue> productionRunProducts = productionRun.getRelated("WorkEffortGoodStandard", UtilMisc.toMap("workEffortGoodStdTypeId", "PRUN_PROD_DELIV"),null);
GenericValue productionRunProduct = EntityUtil.getFirst(productionRunProducts);
- GenericValue productProduced = productionRunProduct.getRelatedOneCache("Product");
+ GenericValue productProduced = productionRunProduct.getRelatedOne("Product", true);
List<GenericValue> productionRunComponents = productionRun.getRelated("WorkEffortGoodStandard", UtilMisc.toMap("workEffortGoodStdTypeId", "PRUNT_PROD_NEEDED"),null);
List<GenericValue> productionRunRoutingTasks = productionRun.getRelated("FromWorkEffortAssoc",UtilMisc.toMap("workEffortTypeId","PROD_ORDER_TASK"),null);
result.put("productionRunProduct", productionRunProduct);
Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java?rev=1343483&r1=1343482&r2=1343483&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java Tue May 29 04:12:26 2012
@@ -304,7 +304,7 @@ public class ProductionRunServices {
if (EntityUtil.isValueActive(routingTaskAssoc, startDate)) {
GenericValue routingTask = null;
try {
- routingTask = routingTaskAssoc.getRelatedOne("ToWorkEffort");
+ routingTask = routingTaskAssoc.getRelatedOne("ToWorkEffort", false);
} catch (GenericEntityException e) {
Debug.logError(e.getMessage(), module);
}
@@ -645,7 +645,7 @@ public class ProductionRunServices {
List<GenericValue> mandatoryWorkEfforts = EntityUtil.filterByDate(delegator.findByAnd("WorkEffortAssoc", UtilMisc.toMap("workEffortIdTo", productionRunId, "workEffortAssocTypeId", "WORK_EFF_PRECEDENCY"), null, false));
for (int i = 0; i < mandatoryWorkEfforts.size(); i++) {
GenericValue mandatoryWorkEffortAssoc = mandatoryWorkEfforts.get(i);
- GenericValue mandatoryWorkEffort = mandatoryWorkEffortAssoc.getRelatedOne("FromWorkEffort");
+ GenericValue mandatoryWorkEffort = mandatoryWorkEffortAssoc.getRelatedOne("FromWorkEffort", false);
if (!(mandatoryWorkEffort.getString("currentStatusId").equals("PRUN_COMPLETED") ||
mandatoryWorkEffort.getString("currentStatusId").equals("PRUN_RUNNING") ||
mandatoryWorkEffort.getString("currentStatusId").equals("PRUN_CLOSED"))) {
@@ -904,7 +904,7 @@ public class ProductionRunServices {
// and compute the overhead costs associated to the finished product
try {
// get the currency
- GenericValue facility = productionRun.getGenericValue().getRelatedOne("Facility");
+ GenericValue facility = productionRun.getGenericValue().getRelatedOne("Facility", false);
Map<String, Object> outputMap = dispatcher.runSync("getPartyAccountingPreferences",
UtilMisc.<String, Object>toMap("userLogin", userLogin,
"organizationPartyId", facility.getString("ownerPartyId")));
@@ -924,8 +924,8 @@ public class ProductionRunServices {
UtilMisc.toList("sequenceNum"), false);
for (int i = 0; i < productCostComponentCalcs.size(); i++) {
GenericValue productCostComponentCalc = productCostComponentCalcs.get(i);
- GenericValue costComponentCalc = productCostComponentCalc.getRelatedOne("CostComponentCalc");
- GenericValue customMethod = costComponentCalc.getRelatedOne("CustomMethod");
+ GenericValue costComponentCalc = productCostComponentCalc.getRelatedOne("CostComponentCalc", false);
+ GenericValue customMethod = costComponentCalc.getRelatedOne("CustomMethod", false);
if (customMethod == null) {
// TODO: not supported for CostComponentCalc entries directly associated to a product
Debug.logWarning("Unable to create cost component for cost component calc with id [" + costComponentCalc.getString("costComponentCalcId") + "] because customMethod is not set", module);
@@ -1054,7 +1054,7 @@ public class ProductionRunServices {
"workEffortAssocTypeId", "WORK_EFF_TEMPLATE"), null, false)));
GenericValue routingTask = null;
if (UtilValidate.isNotEmpty(routingTaskAssoc)) {
- routingTask = routingTaskAssoc.getRelatedOne("FromWorkEffort");
+ routingTask = routingTaskAssoc.getRelatedOne("FromWorkEffort", false);
}
// Get all the valid CostComponentCalc entries
@@ -1063,8 +1063,8 @@ public class ProductionRunServices {
workEffortCostCalcs = EntityUtil.filterByDate(workEffortCostCalcs);
for (GenericValue workEffortCostCalc : workEffortCostCalcs) {
- GenericValue costComponentCalc = workEffortCostCalc.getRelatedOne("CostComponentCalc");
- GenericValue customMethod = costComponentCalc.getRelatedOne("CustomMethod");
+ GenericValue costComponentCalc = workEffortCostCalc.getRelatedOne("CostComponentCalc", false);
+ GenericValue customMethod = costComponentCalc.getRelatedOne("CustomMethod", false);
if (UtilValidate.isEmpty(customMethod) || UtilValidate.isEmpty(customMethod.getString("customMethodName"))) {
// compute the total time
double totalTime = actualTotalMilliSeconds;
@@ -1101,9 +1101,9 @@ public class ProductionRunServices {
}
// Now get the cost information associated to the fixed asset and compute the costs
- GenericValue fixedAsset = workEffort.getRelatedOne("FixedAsset");
+ GenericValue fixedAsset = workEffort.getRelatedOne("FixedAsset", false);
if (UtilValidate.isEmpty(fixedAsset) && UtilValidate.isNotEmpty(routingTask)) {
- fixedAsset = routingTask.getRelatedOne("FixedAsset");
+ fixedAsset = routingTask.getRelatedOne("FixedAsset", false);
}
if (UtilValidate.isNotEmpty(fixedAsset)) {
List<GenericValue> setupCosts = fixedAsset.getRelatedByAnd("FixedAssetStdCost",
@@ -1634,7 +1634,7 @@ public class ProductionRunServices {
BigDecimal unitCost = ZERO;
try {
// get the currency
- GenericValue facility = productionRun.getGenericValue().getRelatedOne("Facility");
+ GenericValue facility = productionRun.getGenericValue().getRelatedOne("Facility", false);
Map<String, Object> outputMap = dispatcher.runSync("getPartyAccountingPreferences", UtilMisc.<String, Object>toMap("userLogin", userLogin, "organizationPartyId", facility.getString("ownerPartyId")));
GenericValue partyAccountingPreference = (GenericValue)outputMap.get("partyAccountingPreference");
if (partyAccountingPreference == null) {
@@ -2431,7 +2431,7 @@ public class ProductionRunServices {
boolean isImmediatelyFulfilled = false;
try {
GenericValue order = delegator.findOne("OrderHeader", UtilMisc.toMap("orderId", orderId), false);
- GenericValue productStore = delegator.getRelatedOne("ProductStore", order);
+ GenericValue productStore = delegator.getRelatedOne("ProductStore", order, false);
isImmediatelyFulfilled = "Y".equals(productStore.getString("isImmediatelyFulfilled"));
} catch (GenericEntityException e) {
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingProductionRunForMarketingPackagesCreationError", UtilMisc.toMap("orderId", orderId, "orderItemSeqId", orderItemSeqId, "errorString", e.getMessage()), locale));
@@ -2589,7 +2589,7 @@ public class ProductionRunServices {
GenericValue orderItem = null;
if ("OrderItemShipGroupAssoc".equals(orderItemOrShipGroupAssoc.getEntityName())) {
try {
- orderItem = orderItemOrShipGroupAssoc.getRelatedOne("OrderItem");
+ orderItem = orderItemOrShipGroupAssoc.getRelatedOne("OrderItem", false);
} catch(GenericEntityException gee) {
Debug.logInfo("Unable to find order item for " + orderItemOrShipGroupAssoc, module);
}
@@ -2941,7 +2941,7 @@ public class ProductionRunServices {
if (inventoryItem.get("availableToPromiseTotal") != null && inventoryItem.getBigDecimal("availableToPromiseTotal").compareTo(ZERO) <= 0) {
return ServiceUtil.returnSuccess();
}
- GenericValue product = inventoryItem.getRelatedOne("Product");
+ GenericValue product = inventoryItem.getRelatedOne("Product", false);
if (product == null) {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceProduct, "ProductProductNotFound", locale) + " " + inventoryItem.get("productId"));
}
Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java?rev=1343483&r1=1343482&r2=1343483&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java Tue May 29 04:12:26 2012
@@ -272,7 +272,7 @@ public class MrpServices {
OrderReadHelper orh = new OrderReadHelper(delegator, orderId);
BigDecimal shippedQuantity = null;
try {
- shippedQuantity = orh.getItemShippedQuantity(genericResult.getRelatedOne("OrderItem"));
+ shippedQuantity = orh.getItemShippedQuantity(genericResult.getRelatedOne("OrderItem", false));
} catch (GenericEntityException e) {
}
if (UtilValidate.isNotEmpty(shippedQuantity)) {
@@ -600,7 +600,7 @@ public class MrpServices {
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpFacilityGroupIsNotAssociatedToFacility", UtilMisc.toMap("facilityGroupId", facilityGroupId), locale));
}
for(GenericValue facilityMember : facilities) {
- GenericValue facility = facilityMember.getRelatedOne("Facility");
+ GenericValue facility = facilityMember.getRelatedOne("Facility", false);
if ("WAREHOUSE".equals(facility.getString("facilityTypeId")) && UtilValidate.isEmpty(facilityId)) {
facilityId = facility.getString("facilityId");
}
@@ -680,7 +680,7 @@ public class MrpServices {
BigDecimal positiveEventQuantity = eventQuantity.compareTo(BigDecimal.ZERO) > 0 ? eventQuantity: eventQuantity.negate();
// It's a new product, so it's necessary to read the MrpQoh
try {
- product = inventoryEventForMRP.getRelatedOneCache("Product");
+ product = inventoryEventForMRP.getRelatedOne("Product", true);
productFacility = EntityUtil.getFirst(product.getRelatedByAndCache("ProductFacility", UtilMisc.toMap("facilityId", facilityId)));
} catch (GenericEntityException e) {
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpCannotFindProductForEvent", locale));
Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/ProposedOrder.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/ProposedOrder.java?rev=1343483&r1=1343482&r2=1343483&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/ProposedOrder.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/ProposedOrder.java Tue May 29 04:12:26 2012
@@ -155,7 +155,7 @@ public class ProposedOrder {
if (EntityUtil.isValueActive(routingTaskAssoc, endDate)) {
GenericValue routingTask = null;
try {
- routingTask = routingTaskAssoc.getRelatedOneCache("ToWorkEffort");
+ routingTask = routingTaskAssoc.getRelatedOne("ToWorkEffort", true);
} catch (GenericEntityException e) {
Debug.logError(e.getMessage(), module);
}
Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java?rev=1343483&r1=1343482&r2=1343483&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java Tue May 29 04:12:26 2012
@@ -172,14 +172,14 @@ public class TechDataServices {
public static GenericValue getTechDataCalendar(GenericValue routingTask) {
GenericValue machineGroup = null, techDataCalendar = null;
try {
- machineGroup = routingTask.getRelatedOneCache("FixedAsset");
+ machineGroup = routingTask.getRelatedOne("FixedAsset", true);
} catch (GenericEntityException e) {
Debug.logError("Pb reading FixedAsset associated with routingTask"+e.getMessage(), module);
}
if (machineGroup != null) {
if (machineGroup.getString("calendarId") != null) {
try {
- techDataCalendar = machineGroup.getRelatedOneCache("TechDataCalendar");
+ techDataCalendar = machineGroup.getRelatedOne("TechDataCalendar", true);
} catch (GenericEntityException e) {
Debug.logError("Pb reading TechDataCalendar associated with machineGroup"+e.getMessage(), module);
}
@@ -188,7 +188,7 @@ public class TechDataServices {
List<GenericValue> machines = machineGroup.getRelatedCache("ChildFixedAsset");
if (machines != null && machines.size()>0) {
GenericValue machine = EntityUtil.getFirst(machines);
- techDataCalendar = machine.getRelatedOneCache("TechDataCalendar");
+ techDataCalendar = machine.getRelatedOne("TechDataCalendar", true);
}
} catch (GenericEntityException e) {
Debug.logError("Pb reading machine child from machineGroup"+e.getMessage(), module);
@@ -270,7 +270,7 @@ public class TechDataServices {
GenericValue techDataCalendarWeek = null;
// TODO read TechDataCalendarExcWeek to manage execption week (maybe it's needed to refactor the entity definition
try {
- techDataCalendarWeek = techDataCalendar.getRelatedOneCache("TechDataCalendarWeek");
+ techDataCalendarWeek = techDataCalendar.getRelatedOne("TechDataCalendarWeek", true);
} catch (GenericEntityException e) {
Debug.logError("Pb reading Calendar Week associated with calendar"+e.getMessage(), module);
return 0;
@@ -302,7 +302,7 @@ public class TechDataServices {
GenericValue techDataCalendarWeek = null;
// TODO read TechDataCalendarExcWeek to manage execption week (maybe it's needed to refactor the entity definition
try {
- techDataCalendarWeek = techDataCalendar.getRelatedOneCache("TechDataCalendarWeek");
+ techDataCalendarWeek = techDataCalendar.getRelatedOne("TechDataCalendarWeek", true);
} catch (GenericEntityException e) {
Debug.logError("Pb reading Calendar Week associated with calendar"+e.getMessage(), module);
return ServiceUtil.returnError("Pb reading Calendar Week associated with calendar");
@@ -424,7 +424,7 @@ public class TechDataServices {
GenericValue techDataCalendarWeek = null;
// TODO read TechDataCalendarExcWeek to manage exception week (maybe it's needed to refactor the entity definition
try {
- techDataCalendarWeek = techDataCalendar.getRelatedOneCache("TechDataCalendarWeek");
+ techDataCalendarWeek = techDataCalendar.getRelatedOne("TechDataCalendarWeek", true);
} catch (GenericEntityException e) {
Debug.logError("Pb reading Calendar Week associated with calendar"+e.getMessage(), module);
return 0;
@@ -456,7 +456,7 @@ public class TechDataServices {
GenericValue techDataCalendarWeek = null;
// TODO read TechDataCalendarExcWeek to manage exception week (maybe it's needed to refactor the entity definition
try {
- techDataCalendarWeek = techDataCalendar.getRelatedOneCache("TechDataCalendarWeek");
+ techDataCalendarWeek = techDataCalendar.getRelatedOne("TechDataCalendarWeek", true);
} catch (GenericEntityException e) {
Debug.logError("Pb reading Calendar Week associated with calendar"+e.getMessage(), module);
return ServiceUtil.returnError("Pb reading Calendar Week associated with calendar");
Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy?rev=1343483&r1=1343482&r2=1343483&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy Tue May 29 04:12:26 2012
@@ -48,7 +48,7 @@ if (productionRunId) {
context.inventoryItems = inventoryItems;
if (inventoryItems) {
lastWorkEffortInventoryProduced = (GenericValue)inventoryItems.get(inventoryItems.size() - 1);
- lastInventoryItem = lastWorkEffortInventoryProduced.getRelatedOne("InventoryItem");
+ lastInventoryItem = lastWorkEffortInventoryProduced.getRelatedOne("InventoryItem", false);
context.lastLotId = lastInventoryItem.lotId;
}
@@ -107,7 +107,7 @@ if (productionRunId) {
templateTaskAssoc = EntityUtil.getFirst(EntityUtil.filterByDate(delegator.findByAnd("WorkEffortAssoc", [workEffortIdTo : routingTask.workEffortId, workEffortAssocTypeId : "WORK_EFF_TEMPLATE"], null, false)));
templateTask = [:];
if (templateTaskAssoc) {
- templateTask = templateTaskAssoc.getRelatedOne("FromWorkEffort");
+ templateTask = templateTaskAssoc.getRelatedOne("FromWorkEffort", false);
}
delivProducts = [];
if (templateTask) {
@@ -161,9 +161,9 @@ if (productionRunId) {
productionRunComponentsAlreadyIssued = FastList.newInstance();
if (productionRunComponents) {
productionRunComponents.each { component ->
- product = component.getRelatedOne("Product");
+ product = component.getRelatedOne("Product", false);
componentName = product.getString("internalName");
- productionRunTask = component.getRelatedOne("WorkEffort");
+ productionRunTask = component.getRelatedOne("WorkEffort", false);
workEffortName = productionRunTask.getString("workEffortName");
Map componentData = component.getAllFields();
componentData.internalName = componentName;
Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/WorkWithShipmentPlans.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/WorkWithShipmentPlans.groovy?rev=1343483&r1=1343482&r2=1343483&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/WorkWithShipmentPlans.groovy (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/WorkWithShipmentPlans.groovy Tue May 29 04:12:26 2012
@@ -31,8 +31,8 @@ if (shipmentPlans) {
workInProgress = "false";
shipmentPlans.each { shipmentPlan ->
oneRow = new HashMap(shipmentPlan);
- // oneRow.putAll(shipmentPlan.getRelatedOne("OrderItemInventoryRes"));
- orderItem = shipmentPlan.getRelatedOne("OrderItem");
+ // oneRow.putAll(shipmentPlan.getRelatedOne("OrderItemInventoryRes", false));
+ orderItem = shipmentPlan.getRelatedOne("OrderItem", false);
oneRow.productId = orderItem.productId;
orderedQuantity = orderItem.quantity;
canceledQuantity = orderItem.cancelQuantity;
@@ -109,7 +109,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.quantity) {
Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PackageContentsAndOrder.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PackageContentsAndOrder.groovy?rev=1343483&r1=1343482&r2=1343483&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PackageContentsAndOrder.groovy (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PackageContentsAndOrder.groovy Tue May 29 04:12:26 2012
@@ -40,7 +40,7 @@ if (packageContents) {
orderShipments = delegator.findByAnd("OrderShipment", [shipmentId : shipmentId, shipmentItemSeqId : packageContent.shipmentItemSeqId], null, false);
orderShipment = EntityUtil.getFirst(orderShipments);
orderItem = delegator.findOne("OrderItem", [orderId : orderShipment.orderId, orderItemSeqId : orderShipment.orderItemSeqId], false);
- product = orderItem.getRelatedOne("Product");
+ product = orderItem.getRelatedOne("Product", false);
// verify if the product is a member of the given category (based on the report's parameter)
if (productCategoryIdPar) {
if (!isProductInCategory(delegator, product.productId, productCategoryIdPar)) {
Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentLabel.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentLabel.groovy?rev=1343483&r1=1343482&r2=1343483&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentLabel.groovy (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentLabel.groovy Tue May 29 04:12:26 2012
@@ -32,7 +32,7 @@ if (shipment) {
shipmentPackages.each { shipmentPackage ->
shipmentPackageComponents = delegator.findByAnd("ShipmentPackageContent", [shipmentId : shipmentId, shipmentPackageSeqId : shipmentPackage.shipmentPackageSeqId], null, false);
shipmentPackageComponents.each { shipmentPackageComponent ->
- shipmentItem = shipmentPackageComponent.getRelatedOne("ShipmentItem");
+ shipmentItem = shipmentPackageComponent.getRelatedOne("ShipmentItem", false);
orderShipments = shipmentItem.getRelated("OrderShipment");
orderShipment = EntityUtil.getFirst(orderShipments);
Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentWorkEffortTasks.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentWorkEffortTasks.groovy?rev=1343483&r1=1343482&r2=1343483&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentWorkEffortTasks.groovy (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/ShipmentWorkEffortTasks.groovy Tue May 29 04:12:26 2012
@@ -35,7 +35,7 @@ if (shipment) {
productionRunProduct = [:];
productionRunProducts = delegator.findByAnd("WorkEffortGoodStandard", [workEffortId : productionRun.workEffortId , workEffortGoodStdTypeId : "PRUN_PROD_DELIV", statusId : "WEGS_CREATED"], null, false);
if (productionRunProducts) {
- productionRunProduct = ((GenericValue)productionRunProducts.get(0)).getRelatedOne("Product");
+ productionRunProduct = ((GenericValue)productionRunProducts.get(0)).getRelatedOne("Product", false);
}
tasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRun.workEffortId, workEffortTypeId : "PROD_ORDER_TASK"], null, false);
tasks.each { task ->
Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/routing/EditCalendarExceptionWeek.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/routing/EditCalendarExceptionWeek.groovy?rev=1343483&r1=1343482&r2=1343483&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/routing/EditCalendarExceptionWeek.groovy (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/routing/EditCalendarExceptionWeek.groovy Tue May 29 04:12:26 2012
@@ -38,7 +38,7 @@ if (techDataCalendar) {
}
calendarExceptionWeeksDatas = [];
calendarExceptionWeeks.each { calendarExceptionWeek ->
- calendarWeek = calendarExceptionWeek.getRelatedOne("TechDataCalendarWeek");
+ calendarWeek = calendarExceptionWeek.getRelatedOne("TechDataCalendarWeek", false);
calendarExceptionWeeksDatas.add([calendarExceptionWeek : calendarExceptionWeek , calendarWeek : calendarWeek]);
}
Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/bom/EditProductBom.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/bom/EditProductBom.ftl?rev=1343483&r1=1343482&r2=1343483&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/bom/EditProductBom.ftl (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/bom/EditProductBom.ftl Tue May 29 04:12:26 2012
@@ -126,7 +126,7 @@ function lookupBom() {
</td>
</tr>
<#else>
- <#assign curProductAssocType = productAssoc.getRelatedOneCache("ProductAssocType")>
+ <#assign curProductAssocType = productAssoc.getRelatedOne("ProductAssocType", true)>
<input type="hidden" name="UPDATE_MODE" value="UPDATE"/>
<input type="hidden" name="productId" value="${productId?if_exists}"/>
<input type="hidden" name="productIdTo" value="${productIdTo?if_exists}"/>
@@ -259,8 +259,8 @@ function lookupBom() {
</tr>
<#assign alt_row = false>
<#list assocFromProducts?if_exists 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 alt_row> class="alternate-row"</#if>>
<td><a href="<@o...@ofbizUrl>" class="buttontext">${(assocFromProduct.productIdTo)?if_exists}</a></td>
<td><#if listToProduct?exists><a href="<@o...@ofbizUrl>" class="buttontext">${(listToProduct.internalName)?if_exists}</a></#if> </td>
@@ -305,8 +305,8 @@ function lookupBom() {
</tr>
<#assign alt_row = false>
<#list assocToProducts?if_exists 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 alt_row> class="alternate-row"</#if>>
<td><a href="<@o...@ofbizUrl>" class="buttontext">${(assocToProduct.productId)?if_exists}</a></td>
<!-- <td><#if listToProduct?exists><a href="<@o...@ofbizUrl>" class="buttontext">${(listToProduct.internalName)?if_exists}</a></#if></td> -->
Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/mrp/findInventoryEventPlan.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/mrp/findInventoryEventPlan.ftl?rev=1343483&r1=1343482&r2=1343483&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/mrp/findInventoryEventPlan.ftl (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/mrp/findInventoryEventPlan.ftl Tue May 29 04:12:26 2012
@@ -148,7 +148,7 @@ document.lookupinventory.productId.focus
<#assign count = lowIndex>
<#assign productTmp = "">
<#list inventoryList[lowIndex..highIndex-1] as inven>
- <#assign product = inven.getRelatedOne("Product")>
+ <#assign product = inven.getRelatedOne("Product", false)>
<#if facilityId?exists && facilityId?has_content>
</#if>
<#if ! product.equals( productTmp )>
@@ -208,7 +208,7 @@ document.lookupinventory.productId.focus
</#if>
<#assign quantityAvailableAtDate = quantityAvailableAtDate?default(0) + inven.getBigDecimal("quantity")>
<#assign productTmp = product>
- <#assign MrpEventType = inven.getRelatedOne("MrpEventType")>
+ <#assign MrpEventType = inven.getRelatedOne("MrpEventType", false)>
<tr class="${rowClass}">
<td>${MrpEventType.get("description",locale)}</td>
<td> </td>