From b7e2fc1e870f5de97f26b6ada47aa04585358299 Mon Sep 17 00:00:00 2001 From: vpj-cd Date: Sun, 19 Apr 2009 06:18:42 +0000 Subject: [PATCH] if you change the BOM it do not is refresh http://sourceforge.net/tracker/?func=detail&aid=2773778&group_id=176962&atid=934929 --- base/src/org/eevolution/model/MPPProductBOM.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/base/src/org/eevolution/model/MPPProductBOM.java b/base/src/org/eevolution/model/MPPProductBOM.java index e6f5f4c7d2..34b8fdf412 100644 --- a/base/src/org/eevolution/model/MPPProductBOM.java +++ b/base/src/org/eevolution/model/MPPProductBOM.java @@ -163,7 +163,7 @@ public class MPPProductBOM extends X_PP_Product_BOM public MPPProductBOMLine[] getLines (Timestamp valid) { List list = new ArrayList(); // Selected BOM Lines Only - for (MPPProductBOMLine bl : getLines()) + for (MPPProductBOMLine bl : getLines(false)) { if (bl.isValidFromTo(valid)) { @@ -175,12 +175,21 @@ public class MPPProductBOM extends X_PP_Product_BOM } // getLines /** - * Get BOM Lines for Product BOM + * Get BOM Lines for Product BOM from cache * @return BOM Lines */ public MPPProductBOMLine[] getLines() { - if (this.m_lines == null) + return getLines(false); + } + + /** + * Get BOM Lines for Product BOM + * @return BOM Lines + */ + public MPPProductBOMLine[] getLines(boolean reload) + { + if (this.m_lines == null || reload) { final String whereClause = MPPProductBOMLine.COLUMNNAME_PP_Product_BOM_ID+"=?"; this.m_lines = new Query(getCtx(), MPPProductBOMLine.Table_Name, whereClause, get_TrxName())