From f3877f9a3d597a00ffd1d4f1295c23aabc62ff53 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Thu, 5 Sep 2013 02:07:54 +0800 Subject: [PATCH 1/9] IDEMPIERE-1319 Foreign key constraint problem on window "Client info" field Logo. --- .../adempiere/webui/window/WImageDialog.java | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WImageDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WImageDialog.java index 02595ab132..84acfa61cc 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WImageDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WImageDialog.java @@ -83,12 +83,15 @@ public class WImageDialog extends Window implements EventListener m_mImage = MImage.get (Env.getCtx(), 0); else { - try { - AImage aImage = new AImage(m_mImage.getName(), m_mImage.getData()); - - image.setContent(aImage); - } catch (Exception e) { - log.log(Level.WARNING, "load image", e); + if (m_mImage.getData()!=null) + { + try { + AImage aImage = new AImage(m_mImage.getName(), m_mImage.getData()); + + image.setContent(aImage); + } catch (Exception e) { + log.log(Level.WARNING, "load image", e); + } } } @@ -183,8 +186,9 @@ public class WImageDialog extends Window implements EventListener } else if (m_mImage != null && m_mImage.getAD_Image_ID() > 0) { - m_mImage.deleteEx(true); - m_mImage = null; + m_mImage.setBinaryData(null); + m_mImage.setName("-"); + m_mImage.saveEx(); } detach(); } @@ -197,6 +201,7 @@ public class WImageDialog extends Window implements EventListener { AImage img = null; image.setContent(img); + fileButton.setLabel("-"); } } From 09aed5f42f6df71b42b445a9c719076e463373ae Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 4 Sep 2013 14:45:52 -0500 Subject: [PATCH 2/9] IDEMPIERE-1329 Images are being saved with EntityType=D --- .../oracle/201309041432_IDEMPIERE-1329.sql | 15 +++++++++++++++ .../postgresql/201309041432_IDEMPIERE-1329.sql | 12 ++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 migration/i1.0c-release/oracle/201309041432_IDEMPIERE-1329.sql create mode 100644 migration/i1.0c-release/postgresql/201309041432_IDEMPIERE-1329.sql diff --git a/migration/i1.0c-release/oracle/201309041432_IDEMPIERE-1329.sql b/migration/i1.0c-release/oracle/201309041432_IDEMPIERE-1329.sql new file mode 100644 index 0000000000..c33884d2ba --- /dev/null +++ b/migration/i1.0c-release/oracle/201309041432_IDEMPIERE-1329.sql @@ -0,0 +1,15 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- Sep 4, 2013 2:23:31 PM COT +-- IDEMPIERE-1329 Images are being saved with EntityType=D +ALTER TABLE AD_Image MODIFY EntityType VARCHAR2(40) DEFAULT 'U' +; + +-- Sep 4, 2013 2:23:32 PM COT +UPDATE AD_Image SET EntityType='U' WHERE EntityType IS NULL OR (EntityType='D' AND AD_Image_ID>=1000000) +; + +SELECT register_migration_script('201309041432_IDEMPIERE-1329.sql') FROM dual +; + diff --git a/migration/i1.0c-release/postgresql/201309041432_IDEMPIERE-1329.sql b/migration/i1.0c-release/postgresql/201309041432_IDEMPIERE-1329.sql new file mode 100644 index 0000000000..d2a366ad7d --- /dev/null +++ b/migration/i1.0c-release/postgresql/201309041432_IDEMPIERE-1329.sql @@ -0,0 +1,12 @@ +-- Sep 4, 2013 2:23:31 PM COT +-- IDEMPIERE-1329 Images are being saved with EntityType=D +INSERT INTO t_alter_column values('ad_image','EntityType','VARCHAR(40)',null,'U') +; + +-- Sep 4, 2013 2:23:32 PM COT +UPDATE AD_Image SET EntityType='U' WHERE EntityType IS NULL OR (EntityType='D' AND AD_Image_ID>=1000000) +; + +SELECT register_migration_script('201309041432_IDEMPIERE-1329.sql') FROM dual +; + From 418a9474864c9cbccbe763cc66726d2e1fb81d6c Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 4 Sep 2013 18:43:36 -0500 Subject: [PATCH 3/9] IDEMPIERE-1321 Attachment panel title is hardcoded (Based on Nicolas Micoud patch) --- .../WEB-INF/src/org/adempiere/webui/panel/WAttachment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java index 1581a1311d..6f41ab7d51 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java @@ -219,7 +219,7 @@ public class WAttachment extends Window implements EventListener this.setMaximizable(true); this.setWidth("700px"); this.setHeight("85%"); - this.setTitle("Attachment"); + this.setTitle(Msg.getMsg(Env.getCtx(), "Attachment")); this.setClosable(true); this.setSizable(true); this.setBorder("normal"); From f632c150f9e3c975fb97203c30703dfc9f18c3e1 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 4 Sep 2013 19:18:13 -0500 Subject: [PATCH 4/9] IDEMPIERE-1320 problem reported with calculator and arithmetic separator , --- org.adempiere.ui.zk/js/calc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.adempiere.ui.zk/js/calc.js b/org.adempiere.ui.zk/js/calc.js index 2e28aee360..ee35c0b3ed 100644 --- a/org.adempiere.ui.zk/js/calc.js +++ b/org.adempiere.ui.zk/js/calc.js @@ -96,7 +96,7 @@ function Calc() var value = calcText.value; if (separator != '.') { - var re = new RegExp("[" + separator + "]"); + var re = new RegExp("[" + separator + "]", "g"); value = value.replace(re,'.'); } var result = "" + eval(value); From be08ddbc05d093bc6e218922d17960ef842aa616 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 4 Sep 2013 19:34:46 -0500 Subject: [PATCH 5/9] IDEMPIERE-1314 getDocumentInfo methods should return translated String (Based on patch from Nicolas Micoud) --- .../src/org/compiere/model/MDocType.java | 12 +++++++++++- .../src/org/compiere/model/MInOut.java | 2 +- .../src/org/compiere/model/MInventory.java | 2 +- .../src/org/compiere/model/MInvoice.java | 2 +- .../src/org/compiere/model/MJournal.java | 2 +- .../src/org/compiere/model/MJournalBatch.java | 2 +- .../src/org/compiere/model/MMovement.java | 2 +- .../src/org/compiere/model/MOrder.java | 2 +- .../src/org/compiere/model/MPayment.java | 2 +- org.adempiere.base/src/org/compiere/model/MRMA.java | 2 +- .../src/org/compiere/process/DocActionTemplate.java | 2 +- .../src/org/eevolution/model/MDDOrder.java | 2 +- 12 files changed, 22 insertions(+), 12 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/MDocType.java b/org.adempiere.base/src/org/compiere/model/MDocType.java index c48daad779..95eae88f4d 100644 --- a/org.adempiere.base/src/org/compiere/model/MDocType.java +++ b/org.adempiere.base/src/org/compiere/model/MDocType.java @@ -41,7 +41,7 @@ public class MDocType extends X_C_DocType /** * */ - private static final long serialVersionUID = 2641885482012907072L; + private static final long serialVersionUID = -6556521509479670059L; /** * Return the first Doc Type for this BaseType @@ -357,4 +357,14 @@ public class MDocType extends X_C_DocType return relatedDocTypeId; } + + /** + * Get translated doctype name + * @return Name if available translated + */ + public String getNameTrl() + { + return get_Translation (COLUMNNAME_Name, Env.getAD_Language(getCtx())); + } // getNameTrl + } // MDocType diff --git a/org.adempiere.base/src/org/compiere/model/MInOut.java b/org.adempiere.base/src/org/compiere/model/MInOut.java index c68d731039..6414e9215b 100644 --- a/org.adempiere.base/src/org/compiere/model/MInOut.java +++ b/org.adempiere.base/src/org/compiere/model/MInOut.java @@ -591,7 +591,7 @@ public class MInOut extends X_M_InOut implements DocAction public String getDocumentInfo() { MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); - StringBuilder msgreturn = new StringBuilder().append(dt.getName()).append(" ").append(getDocumentNo()); + StringBuilder msgreturn = new StringBuilder().append(dt.getNameTrl()).append(" ").append(getDocumentNo()); return msgreturn.toString(); } // getDocumentInfo diff --git a/org.adempiere.base/src/org/compiere/model/MInventory.java b/org.adempiere.base/src/org/compiere/model/MInventory.java index e3c8ad4fd4..275fae9c4d 100644 --- a/org.adempiere.base/src/org/compiere/model/MInventory.java +++ b/org.adempiere.base/src/org/compiere/model/MInventory.java @@ -204,7 +204,7 @@ public class MInventory extends X_M_Inventory implements DocAction public String getDocumentInfo() { MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); - StringBuilder msgreturn = new StringBuilder().append(dt.getName()).append(" ").append(getDocumentNo()); + StringBuilder msgreturn = new StringBuilder().append(dt.getNameTrl()).append(" ").append(getDocumentNo()); return msgreturn.toString(); } // getDocumentInfo diff --git a/org.adempiere.base/src/org/compiere/model/MInvoice.java b/org.adempiere.base/src/org/compiere/model/MInvoice.java index be7f08cd7a..b410b221ac 100644 --- a/org.adempiere.base/src/org/compiere/model/MInvoice.java +++ b/org.adempiere.base/src/org/compiere/model/MInvoice.java @@ -1043,7 +1043,7 @@ public class MInvoice extends X_C_Invoice implements DocAction public String getDocumentInfo() { MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); - StringBuilder msgreturn = new StringBuilder().append(dt.getName()).append(" ").append(getDocumentNo()); + StringBuilder msgreturn = new StringBuilder().append(dt.getNameTrl()).append(" ").append(getDocumentNo()); return msgreturn.toString(); } // getDocumentInfo diff --git a/org.adempiere.base/src/org/compiere/model/MJournal.java b/org.adempiere.base/src/org/compiere/model/MJournal.java index 147dcb63fc..5c06479477 100644 --- a/org.adempiere.base/src/org/compiere/model/MJournal.java +++ b/org.adempiere.base/src/org/compiere/model/MJournal.java @@ -887,7 +887,7 @@ public class MJournal extends X_GL_Journal implements DocAction public String getDocumentInfo() { MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); - StringBuilder msgreturn = new StringBuilder().append(dt.getName()).append(" ").append(getDocumentNo()); + StringBuilder msgreturn = new StringBuilder().append(dt.getNameTrl()).append(" ").append(getDocumentNo()); return msgreturn.toString(); } // getDocumentInfo diff --git a/org.adempiere.base/src/org/compiere/model/MJournalBatch.java b/org.adempiere.base/src/org/compiere/model/MJournalBatch.java index 6d2e657b9b..336cbc25f8 100644 --- a/org.adempiere.base/src/org/compiere/model/MJournalBatch.java +++ b/org.adempiere.base/src/org/compiere/model/MJournalBatch.java @@ -808,7 +808,7 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction public String getDocumentInfo() { MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); - StringBuilder msgreturn = new StringBuilder().append(dt.getName()).append(" ").append(getDocumentNo()); + StringBuilder msgreturn = new StringBuilder().append(dt.getNameTrl()).append(" ").append(getDocumentNo()); return msgreturn.toString(); } // getDocumentInfo diff --git a/org.adempiere.base/src/org/compiere/model/MMovement.java b/org.adempiere.base/src/org/compiere/model/MMovement.java index eabeaaf9ee..2d2af163f8 100644 --- a/org.adempiere.base/src/org/compiere/model/MMovement.java +++ b/org.adempiere.base/src/org/compiere/model/MMovement.java @@ -153,7 +153,7 @@ public class MMovement extends X_M_Movement implements DocAction public String getDocumentInfo() { MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); - return dt.getName() + " " + getDocumentNo(); + return dt.getNameTrl() + " " + getDocumentNo(); } // getDocumentInfo /** diff --git a/org.adempiere.base/src/org/compiere/model/MOrder.java b/org.adempiere.base/src/org/compiere/model/MOrder.java index aa6eee8924..3a3294c962 100644 --- a/org.adempiere.base/src/org/compiere/model/MOrder.java +++ b/org.adempiere.base/src/org/compiere/model/MOrder.java @@ -589,7 +589,7 @@ public class MOrder extends X_C_Order implements DocAction public String getDocumentInfo() { MDocType dt = MDocType.get(getCtx(), getC_DocType_ID() > 0 ? getC_DocType_ID() : getC_DocTypeTarget_ID()); - return dt.getName() + " " + getDocumentNo(); + return dt.getNameTrl() + " " + getDocumentNo(); } // getDocumentInfo /** diff --git a/org.adempiere.base/src/org/compiere/model/MPayment.java b/org.adempiere.base/src/org/compiere/model/MPayment.java index 9ddd4f33ba..e2debae17a 100644 --- a/org.adempiere.base/src/org/compiere/model/MPayment.java +++ b/org.adempiere.base/src/org/compiere/model/MPayment.java @@ -2750,7 +2750,7 @@ public final class MPayment extends X_C_Payment public String getDocumentInfo() { MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); - return dt.getName() + " " + getDocumentNo(); + return dt.getNameTrl() + " " + getDocumentNo(); } // getDocumentInfo /** diff --git a/org.adempiere.base/src/org/compiere/model/MRMA.java b/org.adempiere.base/src/org/compiere/model/MRMA.java index 3cd3cb2e70..5064a69307 100644 --- a/org.adempiere.base/src/org/compiere/model/MRMA.java +++ b/org.adempiere.base/src/org/compiere/model/MRMA.java @@ -203,7 +203,7 @@ public class MRMA extends X_M_RMA implements DocAction public String getDocumentInfo() { MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); - return dt.getName() + " " + getDocumentNo(); + return dt.getNameTrl() + " " + getDocumentNo(); } // getDocumentInfo /** diff --git a/org.adempiere.base/src/org/compiere/process/DocActionTemplate.java b/org.adempiere.base/src/org/compiere/process/DocActionTemplate.java index ce10dccbfa..df0c3d5a39 100644 --- a/org.adempiere.base/src/org/compiere/process/DocActionTemplate.java +++ b/org.adempiere.base/src/org/compiere/process/DocActionTemplate.java @@ -70,7 +70,7 @@ public class DocActionTemplate extends PO implements DocAction public String getDocumentInfo() { MDocType dt = MDocType.get(getCtx(), 0); - return dt.getName() + " " + getDocumentNo(); + return dt.getNameTrl() + " " + getDocumentNo(); } // getDocumentInfo /** diff --git a/org.adempiere.base/src/org/eevolution/model/MDDOrder.java b/org.adempiere.base/src/org/eevolution/model/MDDOrder.java index b97fdcc78b..94b955d2e9 100644 --- a/org.adempiere.base/src/org/eevolution/model/MDDOrder.java +++ b/org.adempiere.base/src/org/eevolution/model/MDDOrder.java @@ -387,7 +387,7 @@ public class MDDOrder extends X_DD_Order implements DocAction public String getDocumentInfo() { MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); - return dt.getName() + " " + getDocumentNo(); + return dt.getNameTrl() + " " + getDocumentNo(); } // getDocumentInfo /** From 621b995aa408377cd6bf610d6e55a532a41cb45c Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Thu, 5 Sep 2013 11:48:28 +0800 Subject: [PATCH 6/9] IDEMPIERE-1307 Voiding allocation header keeps payment allocated. Base on patch from Richard Morales Herrera. --- .../src/org/compiere/model/MAllocationLine.java | 2 +- .../src/org/compiere/model/MPayment.java | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/MAllocationLine.java b/org.adempiere.base/src/org/compiere/model/MAllocationLine.java index f21bb52e72..bf60f9a66a 100644 --- a/org.adempiere.base/src/org/compiere/model/MAllocationLine.java +++ b/org.adempiere.base/src/org/compiere/model/MAllocationLine.java @@ -266,7 +266,7 @@ public class MAllocationLine extends X_C_AllocationLine log.warning("C_BPartner_ID different - Invoice=" + getC_BPartner_ID() + " - Payment=" + payment.getC_BPartner_ID()); if (reverse) { - if (!payment.isCashTrx()) + if (!payment.isCashbookTrx()) { payment.setIsAllocated(false); payment.saveEx(); diff --git a/org.adempiere.base/src/org/compiere/model/MPayment.java b/org.adempiere.base/src/org/compiere/model/MPayment.java index 9ddd4f33ba..ab63d1512e 100644 --- a/org.adempiere.base/src/org/compiere/model/MPayment.java +++ b/org.adempiere.base/src/org/compiere/model/MPayment.java @@ -200,7 +200,7 @@ public final class MPayment extends X_C_Payment } // resetNew /** - * Is Cashbook Transfer Trx + * Is Cash Trx * @return true if Cash Trx */ public boolean isCashTrx() @@ -208,6 +208,14 @@ public final class MPayment extends X_C_Payment return "X".equals(getTenderType()); } // isCashTrx + /** + * Is Cashbook Trx + * @return true if this is a cashbook trx + */ + public boolean isCashbookTrx() { + return isCashTrx() && !MSysConfig.getBooleanValue(MSysConfig.CASH_AS_PAYMENT, true , getAD_Client_ID()); + } + /************************************************************************** * Set Credit Card. * Need to set PatmentProcessor after Amount/Currency Set @@ -650,7 +658,7 @@ public final class MPayment extends X_C_Payment { // @Trifon - CashPayments //if ( getTenderType().equals("X") ) { - if ( isCashTrx() && !MSysConfig.getBooleanValue(MSysConfig.CASH_AS_PAYMENT, true , getAD_Client_ID())) { + if ( isCashbookTrx()) { // Cash Book Is mandatory if ( getC_CashBook_ID() <= 0 ) { log.saveError("Error", Msg.parseTranslation(getCtx(), "@Mandatory@: @C_CashBook_ID@")); @@ -1965,7 +1973,7 @@ public final class MPayment extends X_C_Payment // @Trifon - CashPayments //if ( getTenderType().equals("X") ) { - if ( isCashTrx() && !MSysConfig.getBooleanValue(MSysConfig.CASH_AS_PAYMENT, true , getAD_Client_ID())) { + if ( isCashbookTrx()) { // Create Cash Book entry if ( getC_CashBook_ID() <= 0 ) { log.saveError("Error", Msg.parseTranslation(getCtx(), "@Mandatory@: @C_CashBook_ID@")); @@ -2047,7 +2055,8 @@ public final class MPayment extends X_C_Payment setDocAction(DOCACTION_Close); return DocAction.STATUS_Completed; } // completeIt - + + /** * Set the definite document number after completed */ From dda2a38d3a61cb889afde8f2787427e66572ea72 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Thu, 5 Sep 2013 18:27:11 +0800 Subject: [PATCH 7/9] IDEMPIERE-701 Implement solving indirect context. --- .../src/org/compiere/model/GridField.java | 35 +++++++++++++++++-- .../src/org/compiere/util/Evaluator.java | 2 ++ 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/GridField.java b/org.adempiere.base/src/org/compiere/model/GridField.java index c432a7077c..428cbc661b 100644 --- a/org.adempiere.base/src/org/compiere/model/GridField.java +++ b/org.adempiere.base/src/org/compiere/model/GridField.java @@ -44,6 +44,7 @@ import org.compiere.util.DisplayType; import org.compiere.util.Env; import org.compiere.util.Evaluatee; import org.compiere.util.Evaluator; +import org.compiere.util.Util; /** * Grid Field Model. @@ -897,8 +898,17 @@ public class GridField */ public String get_ValueAsString (Properties ctx, String variableName) { - if( m_vo.TabNo == 0) - return Env.getContext (ctx, m_vo.WindowNo, variableName, true); + //ref column + String foreignColumn = ""; + int f = variableName.indexOf('.'); + if (f > 0) { + foreignColumn = variableName.substring(f+1, variableName.length()); + variableName = variableName.substring(0, f); + } + + String value = null; + if( m_vo.TabNo == 0) + value = Env.getContext (ctx, m_vo.WindowNo, variableName, true); else { boolean tabOnly = false; @@ -907,8 +917,27 @@ public class GridField variableName = variableName.substring(1); tabOnly = true; } - return Env.getContext (ctx, m_vo.WindowNo, m_vo.TabNo, variableName, tabOnly, true); + value = Env.getContext (ctx, m_vo.WindowNo, m_vo.TabNo, variableName, tabOnly, true); } + if (!Util.isEmpty(value) && !Util.isEmpty(foreignColumn) && variableName.endsWith("_ID") + && getGridTab() != null) { + String refValue = ""; + int id = 0; + try { + id = Integer.parseInt(value); + } catch (Exception e){} + if (id > 0) { + MColumn column = MColumn.get(ctx, getGridTab().getTableName(), variableName); + if (column != null) { + String foreignTable = column.getReferenceTableName(); + refValue = DB.getSQLValueString(null, + "SELECT " + foreignColumn + " FROM " + foreignTable + " WHERE " + + foreignTable + "_ID = ?", id); + } + } + return refValue; + } + return value; } // get_ValueAsString diff --git a/org.adempiere.base/src/org/compiere/util/Evaluator.java b/org.adempiere.base/src/org/compiere/util/Evaluator.java index bd12448b06..42b31d1d70 100644 --- a/org.adempiere.base/src/org/compiere/util/Evaluator.java +++ b/org.adempiere.base/src/org/compiere/util/Evaluator.java @@ -289,6 +289,8 @@ public class Evaluator // log.fine( variable); if (variable.startsWith("~")) variable = variable.substring(1); + if (variable.indexOf(".") > 0) + variable = variable.substring(0, variable.indexOf(".")); list.add(variable); } } // parseDepends From e7f227786b9d48deeda623a05730b80e1d56191a Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Fri, 6 Sep 2013 00:23:17 +0800 Subject: [PATCH 8/9] IDEMPIERE-1330 active buttons in Purchase Order and Material Receipt. --- .../WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java index bb5eaf4ec7..01d3bcad5d 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java @@ -920,6 +920,10 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer { gridTab.resetDetailForNewParentRecord(); } + else + { + gridTab.setCurrentRow(-1, true); + } } /** From 9b84f465db154f13aeab0ff5dc38a74e0bf4317d Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Fri, 6 Sep 2013 00:58:18 +0800 Subject: [PATCH 9/9] IDEMPIERE-1330 active buttons in Purchase Order and Material Receipt. Fixed false alarm printed to console. --- org.adempiere.base/src/org/compiere/model/GridTab.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/org.adempiere.base/src/org/compiere/model/GridTab.java b/org.adempiere.base/src/org/compiere/model/GridTab.java index b0ffe31ca9..3328330fef 100644 --- a/org.adempiere.base/src/org/compiere/model/GridTab.java +++ b/org.adempiere.base/src/org/compiere/model/GridTab.java @@ -2427,7 +2427,9 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable // Table Open? if (!m_mTable.isOpen()) { - log.log (Level.SEVERE, "Table not open", new Exception("Table not open")); + if (targetRow >= 0) + log.log (Level.SEVERE, "Table not open", new Exception("Table not open")); + return -1; } // Row Count