From f0c8c2e471385946083b4a8376507995a6493b46 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 27 Feb 2013 13:47:52 -0500 Subject: [PATCH] IDEMPIERE-651 Cannot Navigate to Cost Movement --- org.adempiere.ui.swing/src/org/compiere/grid/VTabbedPane.java | 4 ++++ .../src/org/adempiere/webui/adwindow/AbstractADTabbox.java | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VTabbedPane.java b/org.adempiere.ui.swing/src/org/compiere/grid/VTabbedPane.java index aa38d8583f..6862b66710 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VTabbedPane.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VTabbedPane.java @@ -33,6 +33,7 @@ import org.compiere.util.CLogger; import org.compiere.util.Env; import org.compiere.util.Evaluator; import org.compiere.util.Language; +import org.compiere.util.Util; /** * Tabbed Pane - either Workbench or Window Tab @@ -283,6 +284,9 @@ public class VTabbedPane extends CTabbedPane GridController rightGC = null; //boolean canJump = true; boolean canJump = oldGC.getMTab().getRecord_ID()+zeroValid <=0 ? false : true; // IDEMPIERE 382 + // IDEMPIERE-651 Allow navigating to a detail when parent doesn't have ID + if (! canJump && Util.isEmpty(oldGC.getMTab().getKeyColumnName())) + canJump = true; int currentLevel = newGC.getTabLevel(); for (int i = index-1; i >=0; i--) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADTabbox.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADTabbox.java index 2511db0953..97b8c0b4a5 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADTabbox.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADTabbox.java @@ -30,6 +30,7 @@ import org.compiere.model.MTable; import org.compiere.util.CLogger; import org.compiere.util.Env; import org.compiere.util.Evaluator; +import org.compiere.util.Util; /** * @@ -244,6 +245,9 @@ public abstract class AbstractADTabbox extends AbstractUIPart implements IADTabb int zeroValid = (MTable.isZeroIDTable(oldTabpanel.getTableName()) ? 1 : 0); if (oldTabpanel.getRecord_ID() + zeroValid <= 0) canJump = false; + // IDEMPIERE-651 Allow navigating to a detail when parent doesn't have ID + if (! canJump && Util.isEmpty(oldTabpanel.getGridTab().getKeyColumnName())) + canJump = true; } } }