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 c9bfedf4c8..5b6c6c275d 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 @@ -1210,6 +1210,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer { boolean refresh=true; Treeitem item = treePanel.getTree().getSelectedItem(); + SimpleTreeModel model = (SimpleTreeModel)(TreeModel) treePanel.getTree().getModel(); if (item != null) { @SuppressWarnings("unchecked") @@ -1219,7 +1220,10 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer refresh = false; } } - + if ("Saved".equals(e.getAD_Message()) && model.find(null, gridTab.getRecord_ID())==null) + { + addNewNode(); + } if (refresh) { int AD_Tree_ID = Env.getContextAsInt (Env.getCtx(), getWindowNo(), "AD_Tree_ID", true);