From a9c48277f02c25a124401907bed81c1adb5c8b74 Mon Sep 17 00:00:00 2001 From: Elaine Tan Date: Thu, 30 Aug 2012 11:57:48 +0800 Subject: [PATCH] Fixed 'IsSOTrx' context for window --- .../org/adempiere/webui/panel/AbstractADWindowPanel.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractADWindowPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractADWindowPanel.java index 3f3538c29b..db7a89464d 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractADWindowPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractADWindowPanel.java @@ -308,8 +308,7 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To gridWindow = new GridWindow(gWindowVO, true); title = gridWindow.getName(); - // Set SO/AutoNew for Window - Env.setContext(ctx, curWindowNo, "IsSOTrx", gridWindow.isSOTrx()); + // Set AutoNew for Window if (!autoNew && gridWindow.isTransaction()) { Env.setAutoNew(ctx, curWindowNo, true); @@ -358,7 +357,9 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To { curTabIndex = 0; - adTab.setSelectedIndex(0); + adTab.setSelectedIndex(0); + // all fields context for window is clear at AbstractADTab.prepareContext, set IsSOTrx for window + Env.setContext(ctx, curWindowNo, "IsSOTrx", gridWindow.isSOTrx()); toolbar.enableTabNavigation(adTab.getTabCount() > 1); toolbar.enableFind(true); adTab.evaluate(null);