fixed FR-43978: remove obsolete tree implementation
authorStefan Huehner <stefan.huehner@openbravo.com>
Fri, 08 May 2020 12:49:45 +0200
changeset 37355 6c4fa9f73df9
parent 37354 2a5eb79c1afb
child 37356 eb7e83516d4d
fixed FR 43978: remove obsolete tree implementation
modules/org.openbravo.client.application/src-db/database/sourcedata/AD_REF_LIST.xml
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewTab.java
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
src-db/database/sourcedata/AD_MESSAGE.xml
src-db/database/sourcedata/AD_MODEL_OBJECT.xml
src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml
src-db/database/sourcedata/AD_TEXTINTERFACES.xml
src/org/openbravo/erpCommon/utility/WindowTree.html
src/org/openbravo/erpCommon/utility/WindowTree.java
src/org/openbravo/erpCommon/utility/WindowTree.xml
src/org/openbravo/erpCommon/utility/WindowTreeChecks.java
src/org/openbravo/erpCommon/utility/WindowTreeChecksClient.java
src/org/openbravo/erpCommon/utility/WindowTreeChecks_data.xsql
src/org/openbravo/erpCommon/utility/WindowTreeUtility.java
src/org/openbravo/erpCommon/utility/WindowTree_data.xsql
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_REF_LIST.xml	Tue May 19 15:31:03 2020 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_REF_LIST.xml	Fri May 08 12:49:45 2020 +0200
@@ -201,17 +201,6 @@
 <!--57A4B4D636954DF88444CAD72B20598B-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--57A4B4D636954DF88444CAD72B20598B--></AD_REF_LIST>
 
-<!--67C9AE863A644F46BC21F563E4910F6C--><AD_REF_LIST>
-<!--67C9AE863A644F46BC21F563E4910F6C-->  <AD_REF_LIST_ID><![CDATA[67C9AE863A644F46BC21F563E4910F6C]]></AD_REF_LIST_ID>
-<!--67C9AE863A644F46BC21F563E4910F6C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--67C9AE863A644F46BC21F563E4910F6C-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--67C9AE863A644F46BC21F563E4910F6C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--67C9AE863A644F46BC21F563E4910F6C-->  <VALUE><![CDATA[OBUIAPP_UseClassicTreeView]]></VALUE>
-<!--67C9AE863A644F46BC21F563E4910F6C-->  <NAME><![CDATA[Use Classic Popup Tree]]></NAME>
-<!--67C9AE863A644F46BC21F563E4910F6C-->  <AD_REFERENCE_ID><![CDATA[A26BA480E2014707B47257024C3CBFF7]]></AD_REFERENCE_ID>
-<!--67C9AE863A644F46BC21F563E4910F6C-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
-<!--67C9AE863A644F46BC21F563E4910F6C--></AD_REF_LIST>
-
 <!--690FF92F61234B8B8A18EA60FD7C8C4A--><AD_REF_LIST>
 <!--690FF92F61234B8B8A18EA60FD7C8C4A-->  <AD_REF_LIST_ID><![CDATA[690FF92F61234B8B8A18EA60FD7C8C4A]]></AD_REF_LIST_ID>
 <!--690FF92F61234B8B8A18EA60FD7C8C4A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewTab.java	Tue May 19 15:31:03 2020 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewTab.java	Fri May 08 12:49:45 2020 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2019 Openbravo SLU 
+ * All portions are Copyright (C) 2010-2020 Openbravo SLU 
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -55,9 +55,7 @@
 import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.data.Sqlc;
-import org.openbravo.erpCommon.businessUtility.Preferences;
 import org.openbravo.erpCommon.obps.ActivationKey;
-import org.openbravo.erpCommon.utility.PropertyException;
 import org.openbravo.erpCommon.utility.Utility;
 import org.openbravo.model.ad.datamodel.Column;
 import org.openbravo.model.ad.domain.ModelImplementation;
@@ -275,34 +273,13 @@
       iconButtons.add(auditBtn);
     }
 
-    String useClassicPopupTreeStr = null;
-    try {
-      useClassicPopupTreeStr = Preferences.getPreferenceValue("OBUIAPP_UseClassicTreeView", true,
-          OBContext.getOBContext().getCurrentClient(),
-          OBContext.getOBContext().getCurrentOrganization(), OBContext.getOBContext().getUser(),
-          OBContext.getOBContext().getRole(), tab.getWindow());
-    } catch (PropertyException e) {
-      // The property is not defined, so the classic popup tree should not be used
-    }
-    boolean useClassicPopupTree = (Preferences.YES.equals(useClassicPopupTreeStr));
-
     if (tab.getTableTree() != null) {
-      if (useClassicPopupTree) {
-        // Classic Tree button
-        IconButton treeBtn = new IconButton();
-        treeBtn.type = "tree";
-        treeBtn.label = Utility.messageBD(new DalConnectionProvider(false), "Tree",
-            OBContext.getOBContext().getLanguage().getLanguage());
-        treeBtn.action = "OB.ToolbarUtils.showTree(this.view);";
-        iconButtons.add(treeBtn);
-      } else {
-        IconButton treeBtn = new IconButton();
-        treeBtn.type = "treeGrid";
-        treeBtn.label = Utility.messageBD(new DalConnectionProvider(false),
-            "OBUIAPP_TOGGLE_TREE_BUTTON", OBContext.getOBContext().getLanguage().getLanguage());
-        treeBtn.action = "OB.ToolbarUtils.toggleTreeGridVisibility(this.view);";
-        iconButtons.add(treeBtn);
-      }
+      IconButton treeBtn = new IconButton();
+      treeBtn.type = "treeGrid";
+      treeBtn.label = Utility.messageBD(new DalConnectionProvider(false),
+          "OBUIAPP_TOGGLE_TREE_BUTTON", OBContext.getOBContext().getLanguage().getLanguage());
+      treeBtn.action = "OB.ToolbarUtils.toggleTreeGridVisibility(this.view);";
+      iconButtons.add(treeBtn);
     }
 
     return iconButtons;
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js	Tue May 19 15:31:03 2020 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js	Fri May 08 12:49:45 2020 +0200
@@ -2131,47 +2131,6 @@
   );
 };
 
-OB.ToolbarUtils.showTree = function(view) {
-  var tabId = view.tabId;
-
-  function openPopupTree() {
-    var popupParams = 'Command=DEFAULT';
-    popupParams += '&inpTabId=' + tabId;
-    popupParams += '&hideMenu=true&noprefs=true';
-
-    if (OB.Utilities.isIE9Strict) {
-      // Drag and drop tree is not well rendered with IE9 + HTML5, so it should be opened in an isolated popup
-      OB.Utilities.openProcessPopup(
-        OB.Application.contextUrl + 'utility/WindowTree.html?' + popupParams,
-        true,
-        null,
-        670,
-        750
-      );
-    } else {
-      OB.Layout.ClassicOBCompatibility.Popup.open(
-        'tree',
-        750,
-        625,
-        OB.Application.contextUrl + 'utility/WindowTree.html?' + popupParams,
-        '',
-        window,
-        true,
-        true,
-        true,
-        null,
-        false
-      );
-    }
-  }
-
-  view.setContextInfo(
-    view.getContextInfo(true, true, true, true),
-    openPopupTree,
-    true
-  );
-};
-
 OB.ToolbarUtils.showTreeGrid = function(view) {
   var treeGrid = view.treeGrid,
     viewGrid = view.viewGrid;
--- a/src-db/database/sourcedata/AD_MESSAGE.xml	Tue May 19 15:31:03 2020 +0200
+++ b/src-db/database/sourcedata/AD_MESSAGE.xml	Fri May 08 12:49:45 2020 +0200
@@ -7715,30 +7715,6 @@
 <!--800065-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--800065--></AD_MESSAGE>
 
-<!--800066--><AD_MESSAGE>
-<!--800066-->  <AD_MESSAGE_ID><![CDATA[800066]]></AD_MESSAGE_ID>
-<!--800066-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--800066-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--800066-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--800066-->  <VALUE><![CDATA[SameElement]]></VALUE>
-<!--800066-->  <MSGTEXT><![CDATA[Both are the same element]]></MSGTEXT>
-<!--800066-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
-<!--800066-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--800066-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
-<!--800066--></AD_MESSAGE>
-
-<!--800067--><AD_MESSAGE>
-<!--800067-->  <AD_MESSAGE_ID><![CDATA[800067]]></AD_MESSAGE_ID>
-<!--800067-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--800067-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--800067-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--800067-->  <VALUE><![CDATA[NotIsSummary]]></VALUE>
-<!--800067-->  <MSGTEXT><![CDATA[The element is not summary]]></MSGTEXT>
-<!--800067-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
-<!--800067-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--800067-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
-<!--800067--></AD_MESSAGE>
-
 <!--800068--><AD_MESSAGE>
 <!--800068-->  <AD_MESSAGE_ID><![CDATA[800068]]></AD_MESSAGE_ID>
 <!--800068-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -8747,18 +8723,6 @@
 <!--800155-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--800155--></AD_MESSAGE>
 
-<!--800156--><AD_MESSAGE>
-<!--800156-->  <AD_MESSAGE_ID><![CDATA[800156]]></AD_MESSAGE_ID>
-<!--800156-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--800156-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--800156-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--800156-->  <VALUE><![CDATA[RecursiveTree]]></VALUE>
-<!--800156-->  <MSGTEXT><![CDATA[A node cannot be its own parent. (Recursive tree).]]></MSGTEXT>
-<!--800156-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
-<!--800156-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--800156-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
-<!--800156--></AD_MESSAGE>
-
 <!--800157--><AD_MESSAGE>
 <!--800157-->  <AD_MESSAGE_ID><![CDATA[800157]]></AD_MESSAGE_ID>
 <!--800157-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -15656,18 +15620,6 @@
 <!--04591200C09947A08DA4E8462197B2C3-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--04591200C09947A08DA4E8462197B2C3--></AD_MESSAGE>
 
-<!--04DDD225150B48C1B9A94E673BEF2ED9--><AD_MESSAGE>
-<!--04DDD225150B48C1B9A94E673BEF2ED9-->  <AD_MESSAGE_ID><![CDATA[04DDD225150B48C1B9A94E673BEF2ED9]]></AD_MESSAGE_ID>
-<!--04DDD225150B48C1B9A94E673BEF2ED9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--04DDD225150B48C1B9A94E673BEF2ED9-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--04DDD225150B48C1B9A94E673BEF2ED9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--04DDD225150B48C1B9A94E673BEF2ED9-->  <VALUE><![CDATA[CannotReorderNotDevModules]]></VALUE>
-<!--04DDD225150B48C1B9A94E673BEF2ED9-->  <MSGTEXT><![CDATA[Cannot reorder elements that belong to modules that are not currently in development.]]></MSGTEXT>
-<!--04DDD225150B48C1B9A94E673BEF2ED9-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
-<!--04DDD225150B48C1B9A94E673BEF2ED9-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--04DDD225150B48C1B9A94E673BEF2ED9-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
-<!--04DDD225150B48C1B9A94E673BEF2ED9--></AD_MESSAGE>
-
 <!--04EEC6B52A7B4C2CACA1F767217FAFB7--><AD_MESSAGE>
 <!--04EEC6B52A7B4C2CACA1F767217FAFB7-->  <AD_MESSAGE_ID><![CDATA[04EEC6B52A7B4C2CACA1F767217FAFB7]]></AD_MESSAGE_ID>
 <!--04EEC6B52A7B4C2CACA1F767217FAFB7-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_MODEL_OBJECT.xml	Tue May 19 15:31:03 2020 +0200
+++ b/src-db/database/sourcedata/AD_MODEL_OBJECT.xml	Fri May 08 12:49:45 2020 +0200
@@ -900,18 +900,6 @@
 <!--800670-->  <OBJECT_TYPE><![CDATA[S]]></OBJECT_TYPE>
 <!--800670--></AD_MODEL_OBJECT>
 
-<!--800671--><AD_MODEL_OBJECT>
-<!--800671-->  <AD_MODEL_OBJECT_ID><![CDATA[800671]]></AD_MODEL_OBJECT_ID>
-<!--800671-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--800671-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--800671-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--800671-->  <ACTION><![CDATA[X]]></ACTION>
-<!--800671-->  <CLASSNAME><![CDATA[org.openbravo.erpCommon.utility.WindowTree]]></CLASSNAME>
-<!--800671-->  <ISDEFAULT><![CDATA[Y]]></ISDEFAULT>
-<!--800671-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--800671-->  <OBJECT_TYPE><![CDATA[S]]></OBJECT_TYPE>
-<!--800671--></AD_MODEL_OBJECT>
-
 <!--800681--><AD_MODEL_OBJECT>
 <!--800681-->  <AD_MODEL_OBJECT_ID><![CDATA[800681]]></AD_MODEL_OBJECT_ID>
 <!--800681-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml	Tue May 19 15:31:03 2020 +0200
+++ b/src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml	Fri May 08 12:49:45 2020 +0200
@@ -1170,16 +1170,6 @@
 <!--802177-->  <ISDEFAULT><![CDATA[Y]]></ISDEFAULT>
 <!--802177--></AD_MODEL_OBJECT_MAPPING>
 
-<!--802671--><AD_MODEL_OBJECT_MAPPING>
-<!--802671-->  <AD_MODEL_OBJECT_MAPPING_ID><![CDATA[802671]]></AD_MODEL_OBJECT_MAPPING_ID>
-<!--802671-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--802671-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--802671-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--802671-->  <AD_MODEL_OBJECT_ID><![CDATA[800671]]></AD_MODEL_OBJECT_ID>
-<!--802671-->  <MAPPINGNAME><![CDATA[/utility/WindowTree.html]]></MAPPINGNAME>
-<!--802671-->  <ISDEFAULT><![CDATA[N]]></ISDEFAULT>
-<!--802671--></AD_MODEL_OBJECT_MAPPING>
-
 <!--802672--><AD_MODEL_OBJECT_MAPPING>
 <!--802672-->  <AD_MODEL_OBJECT_MAPPING_ID><![CDATA[802672]]></AD_MODEL_OBJECT_MAPPING_ID>
 <!--802672-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Tue May 19 15:31:03 2020 +0200
+++ b/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Fri May 08 12:49:45 2020 +0200
@@ -7261,61 +7261,6 @@
 <!--810042-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--810042--></AD_TEXTINTERFACES>
 
-<!--810043--><AD_TEXTINTERFACES>
-<!--810043-->  <AD_TEXTINTERFACES_ID><![CDATA[810043]]></AD_TEXTINTERFACES_ID>
-<!--810043-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--810043-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--810043-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--810043-->  <TEXT><![CDATA[Unlock Tree]]></TEXT>
-<!--810043-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/utility/WindowTree.html]]></FILENAME>
-<!--810043-->  <ISUSED><![CDATA[Y]]></ISUSED>
-<!--810043-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--810043--></AD_TEXTINTERFACES>
-
-<!--810044--><AD_TEXTINTERFACES>
-<!--810044-->  <AD_TEXTINTERFACES_ID><![CDATA[810044]]></AD_TEXTINTERFACES_ID>
-<!--810044-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--810044-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--810044-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--810044-->  <TEXT><![CDATA[Lock Tree]]></TEXT>
-<!--810044-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/utility/WindowTree.html]]></FILENAME>
-<!--810044-->  <ISUSED><![CDATA[Y]]></ISUSED>
-<!--810044-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--810044--></AD_TEXTINTERFACES>
-
-<!--810045--><AD_TEXTINTERFACES>
-<!--810045-->  <AD_TEXTINTERFACES_ID><![CDATA[810045]]></AD_TEXTINTERFACES_ID>
-<!--810045-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--810045-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--810045-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--810045-->  <TEXT><![CDATA[Expand all]]></TEXT>
-<!--810045-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/utility/WindowTree.html]]></FILENAME>
-<!--810045-->  <ISUSED><![CDATA[Y]]></ISUSED>
-<!--810045-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--810045--></AD_TEXTINTERFACES>
-
-<!--810046--><AD_TEXTINTERFACES>
-<!--810046-->  <AD_TEXTINTERFACES_ID><![CDATA[810046]]></AD_TEXTINTERFACES_ID>
-<!--810046-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--810046-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--810046-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--810046-->  <TEXT><![CDATA[Collapse all]]></TEXT>
-<!--810046-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/utility/WindowTree.html]]></FILENAME>
-<!--810046-->  <ISUSED><![CDATA[Y]]></ISUSED>
-<!--810046-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--810046--></AD_TEXTINTERFACES>
-
-<!--810047--><AD_TEXTINTERFACES>
-<!--810047-->  <AD_TEXTINTERFACES_ID><![CDATA[810047]]></AD_TEXTINTERFACES_ID>
-<!--810047-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--810047-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--810047-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--810047-->  <TEXT><![CDATA[Close]]></TEXT>
-<!--810047-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/utility/WindowTree.html]]></FILENAME>
-<!--810047-->  <ISUSED><![CDATA[Y]]></ISUSED>
-<!--810047-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--810047--></AD_TEXTINTERFACES>
-
 <!--810065--><AD_TEXTINTERFACES>
 <!--810065-->  <AD_TEXTINTERFACES_ID><![CDATA[810065]]></AD_TEXTINTERFACES_ID>
 <!--810065-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -10831,17 +10776,6 @@
 <!--0EF5394D5C174805860A75C2C42FE1E5-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--0EF5394D5C174805860A75C2C42FE1E5--></AD_TEXTINTERFACES>
 
-<!--0F9B9D3FE71C4172B53EBC5D49E1D00D--><AD_TEXTINTERFACES>
-<!--0F9B9D3FE71C4172B53EBC5D49E1D00D-->  <AD_TEXTINTERFACES_ID><![CDATA[0F9B9D3FE71C4172B53EBC5D49E1D00D]]></AD_TEXTINTERFACES_ID>
-<!--0F9B9D3FE71C4172B53EBC5D49E1D00D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--0F9B9D3FE71C4172B53EBC5D49E1D00D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--0F9B9D3FE71C4172B53EBC5D49E1D00D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--0F9B9D3FE71C4172B53EBC5D49E1D00D-->  <TEXT><![CDATA[Tree View]]></TEXT>
-<!--0F9B9D3FE71C4172B53EBC5D49E1D00D-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/utility/WindowTree.html]]></FILENAME>
-<!--0F9B9D3FE71C4172B53EBC5D49E1D00D-->  <ISUSED><![CDATA[Y]]></ISUSED>
-<!--0F9B9D3FE71C4172B53EBC5D49E1D00D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--0F9B9D3FE71C4172B53EBC5D49E1D00D--></AD_TEXTINTERFACES>
-
 <!--1041053B86344F1E87104D22119C7826--><AD_TEXTINTERFACES>
 <!--1041053B86344F1E87104D22119C7826-->  <AD_TEXTINTERFACES_ID><![CDATA[1041053B86344F1E87104D22119C7826]]></AD_TEXTINTERFACES_ID>
 <!--1041053B86344F1E87104D22119C7826-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src/org/openbravo/erpCommon/utility/WindowTree.html	Tue May 19 15:31:03 2020 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,566 +0,0 @@
-<!--
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2019 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
--->
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<title>Tree View</title>
-<link rel="shortcut icon" href="../../../../../web/images/favicon.ico" type="image/x-icon" />
-<link rel="stylesheet" type="text/css" href="../../../../../web/skins/Default/Openbravo_ERP_250.css" id="paramCSS"></link>
-<script language="JavaScript" type="text/javascript" id="paramDirectory">
-var baseDirectory = "../../../../../web/";
-</script>
-<script language="JavaScript" src="../utility/DynamicJS.js" type="text/javascript"></script>
-<script language="JavaScript" type="text/javascript" id="paramLanguage">
-  defaultLang = "en_US";
-</script>
-<script language="JavaScript" src="../../../../../web/js/shortcuts.js" type="text/javascript"></script>
-<script language="JavaScript" src="../../../../../web/js/utils.js" type="text/javascript"></script>
-<script language="JavaScript" src="../../../../../web/js/messages.js" type="text/javascript"></script>
-<script language="JavaScript" src="../../../../../web/js/windowKeyboard.js" type="text/javascript"></script>
-<script language="JavaScript" src="../../../../../web/js/ajax.js" type="text/javascript"></script>
-<script language="JavaScript" src="../../../../../web/js/default/MessageBox.js" type="text/javascript"></script>
-<script language="JavaScript" type="text/javascript" src="../../../../../web/js/DHTMLgoodies/context-menu.js"></script>
-<script language="JavaScript" type="text/javascript" src="../../../../../web/js/DHTMLgoodies/drag-drop-folder-tree.js"></script>
-<script language="JavaScript" type="text/javascript" id="paramKeyField">
-function getKeyField() {
-    return document.frmMain.inpKey;
-}
-</script>
-  <script language="JavaScript" type="text/javascript">
-    function dblClickItem(nodeID) {
-      var layoutMDI = getFrame('LayoutMDI');
-      if (layoutMDI) {
-        layoutMDI.OB.Utilities.openDirectTab(document.frmMain.inpTabId.value, nodeID);
-      } else {
-        top.opener.submitCommandForm("EDIT", false, null, document.forms[0].myAction.value + "?Command=EDIT&" + getKeyField().name + "=" + nodeID, '_self');
-      }
-      return true;
-    }
-  </script>
-  <script language="JavaScript" type="text/javascript">
-    function idReplace(id) {
-      var output = id.substring(id.lastIndexOf("__")+2);
-      return output;
-    }
-
-    function submitDraggingInfo(strTop, strLink, strChild) {
-      document.frmMain.inpTop.value = idReplace(strTop);
-      document.frmMain.inpLink.value = idReplace(strLink);
-      document.frmMain.inpChild.value = strChild;
-      try {
-        var paramXMLReq = null;
-        return submitXmlHttpRequest(callback, frmMain, "ASSIGN", "WindowTree.html", false, null, paramXMLReq);
-      }
-      catch (e) {
-        initialize_MessageBox('messageBoxID');
-        setValues_MessageBox('messageBoxID','ERROR','ERROR',e);
-      }
-    }
-
-    function callback(paramXMLParticular, XMLHttpRequestObj) {
-      var strText = "";
-      if (getReadyStateHandler(XMLHttpRequestObj,null,false)) {
-        try {
-          if (XMLHttpRequestObj.responseText) strText = XMLHttpRequestObj.responseText;
-        } catch (e) {
-          initialize_MessageBox('messageBoxID');
-          setValues_MessageBox('messageBoxID','ERROR','ERROR',e);
-        }
-        if (strText == "") {
-          showJSMessage(22);
-        } else {
-          var msg = JSON.parse(strText);
-          initialize_MessageBox('messageBoxID');
-          setValues_MessageBox('messageBoxID',msg.OBError.type, msg.OBError.title, msg.OBError.message);
-        }
-      }
-      return true;
-    }
-
-     function showInfo() { 
-       showJSMessage(21);
-     }
-  </script>
-  <script language="javascript">
-    var isScrollable = false;
-    var isScrolling = false;
-    var scrollDir = '';
-    var showingInfoKey = '';
-    function enableScroll(status) {
-      isScrollable = status;
-      if (isScrollable == true) {
-        if (showingInfoKey == true) {
-          showInfo();
-          showingInfoKey = false;
-        }
-      } else {
-        showingInfoKey = true;
-      }
-    }
-    function setScroll(status) {
-      if(isScrollable == true) {
-        isScrolling = status;
-      } else {
-        isScrolling = false;
-      }
-    }
-    function scrollTree(direction) {
-      scrollDir = direction;
-      if(isScrolling == true) {
-        if (scrollDir == 'up') {
-          setTimeout("UpScroll()",5);
-        } else if (scrollDir == 'down') {
-          setTimeout("DownScroll()",5);
-        }
-      }
-    }
-    function UpScroll() {
-      if(document.getElementById('openbravo_tree').scrollTop >= 0) {
-        document.getElementById('openbravo_tree').scrollTop -= 3;
-        scrollTree('up');
-      }
-    }
-    function DownScroll() {
-      if(document.getElementById('openbravo_tree').scrollTop <= document.getElementById('openbravo_tree').scrollHeight) {
-        document.getElementById('openbravo_tree').scrollTop += 3;
-        scrollTree('down');
-      }
-    }
-
-    function LockTree() {
-      treeObj.lockTree();
-      document.getElementById('lockbutton').style.display = "none";
-      document.getElementById('unlockbutton').style.display = "";
-      initialize_MessageBox('messageBoxID');
-      setValues_MessageBox('messageBoxID','INFO','INFO','Press "Unlock Tree" button if you want to start drag and drop the tree');
-    }
-
-    function UnlockTree() {
-      treeObj.unlockTree();
-      document.getElementById('unlockbutton').style.display = "none";
-      document.getElementById('lockbutton').style.display = "";
-      showInfo();
-    }
-
-    function resizeMessageBoxContainer() {
-      var MessageBoxContainer = document.getElementById("tdMessageBoxContainer");
-      MessageBoxContainer.style.height = (MessageBoxContainer?MessageBoxContainer.clientHeight:0) + 1;
-    }
-
-  </script>
-  <script language="javascript">
-    function resizeMenuArea() {
-      var topAreaContainer = document.getElementById("topArea");
-      var bottomAreaContainer = document.getElementById("bottomArea");
-      var menuAreaContainer = document.getElementById("openbravo_tree");
-      var body = document.getElementsByTagName("BODY");
-      var windowHeight;
-      if (isIE9Strict) {
-        windowHeight = window.innerHeight;
-      } else {
-        windowHeight = body[0].clientHeight;
-      }
-      var menuAreaContainerHeight = windowHeight - topAreaContainer.clientHeight - bottomAreaContainer.clientHeight;
-      if (menuAreaContainerHeight < 0) { menuAreaContainerHeight = 0; }
-      menuAreaContainer.style.height = menuAreaContainerHeight;
-    }
-  </script>
-<script language="JavaScript" type="text/javascript">
-  
-  function onLoadDo(){
-    this.windowTables = new Array(
-      new windowTableId('client_button')
-    );
-    setWindowTableParentElement();
-    enableShortcuts('popup');
-    setBrowserAutoComplete(false);
-
-    try {
-      onloadFunctions();
-    } catch (e) {}
-    resizeMessageBoxContainer(); 
-    resizeMenuArea();
-
-    setWindowElementFocus('firstElement');
-    
-    return true;
-
-  }
-
-  function onResizeDo(){
-    resizeMenuArea();
-  }
-  
-  function closeThis(){
-    closePage();
-  }
-</script>  
-</head>
-
-<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" class="Menu" onload="onLoadDo();" onresize="onResizeDo();">
-
-<div class="Popup_ContentPane_CircleLogo">
-  <div class="Popup_WindowLogo">
-    <img class="Popup_WindowLogo_Icon Popup_WindowLogo_Icon_organizeMenu" src="../../../../../web/images/blank.gif" border=0/>
-  </div>
-</div>
-
-<div onmouseover="setScroll(true); scrollTree('up');" onmouseout="setScroll(false);">
-  <table cellspacing="0" cellpadding="0" width="100%" id="topArea">
-    <tr>
-      <td>
-        <table cellspacing="0" cellpadding="0" class="Popup_ContentPane_NavBar">
-          <tr class="Popup_NavBar_bg"><td></td>
-            <td class="Popup_NavBar_separator_cell"></td>
-            <td class="Popup_NavBar_bg_logo_left"></td>
-            <td class="Popup_NavBar_bg_logo" width="1" onclick="openNewBrowser('http://www.openbravo.com', 'Openbravo');return false;"><img src="../../../../../web/images/blank.gif" alt="Openbravo" title="Openbravo" border="0" id="openbravoLogo" class="Popup_NavBar_logo" /></td>
-            <td class="Popup_NavBar_bg_logo_right"></td>
-            <td class="Popup_NavBar_Popup_title_cell"><span id="paramDescription">xxProcess window</span></td>
-            <td class="Popup_NavBar_separator_cell"></td>
-          </tr>
-        </table>
-      </td>
-    </tr>
-    <tr>
-      <td>
-        <table cellspacing="0" cellpadding="0" class="Popup_ContentPane_SeparatorBar">
-          <tr>
-            <td class="Popup_SeparatorBar_bg"></td>
-          </tr>
-        </table>
-      </td>
-    </tr>
-    <tr>
-      <td id="tdMessageBoxContainer">
-
-        <table cellpadding="0" cellspacing="0" id="messageBoxID" class="MessageBoxyy">
-          <tbody>
-          <tr class="MessageBox_TopMargin">
-            <td class="MessageBox_LeftMargin"></td>
-            <td></td>
-            <td class="MessageBox_RightMargin"></td>
-          </tr>
-          <tr>
-            <td class="MessageBox_LeftMargin"></td>
-            <td>
-
-              <table cellpadding="0" cellspacing="0" class="MessageBox_Container">
-                <tbody>
-                <tr>
-                  <td class="MessageBox_LeftTrans">
-                    <table style="width: 100%; height: 100%" cellpadding="0" cellspacing="0">
-                      <tbody>
-                      <tr>
-                        <td class="MessageBox_TopLeft"></td>
-                      </tr>
-                      <tr>
-                        <td class="MessageBox_Left"></td>
-                      </tr>
-                      </tbody>
-                    </table>
-                  </td>
-                  <td class="MessageBox_bg">
-
-                    <table class="MessageBox_Top">
-                    <tbody>
-                      <tr>
-                        <td>
-                          <span>
-                          <table cellpadding="0" cellspacing="0" class="MessageBox_Body_ContentCell">
-                            <tbody>
-                            <tr>
-                              <td class="MessageBox_Icon_ContentCell">
-                                <div class="MessageBox_Icon"></div>
-                              </td>
-                              <td style="vertical-align: top;" id="messageBoxIDContent">
-                                <span>
-                                  <div class="MessageBox_TextTitle" id="messageBoxIDTitle">
-                                    xxInfo: AccessTableWithNoView
-                                  </div>
-                                  <div class="MessageBox_TextDescription" id="messageBoxIDMessage">
-                                    xxThe current information is empty.
-                                  </div>
-                                  <div class="MessageBox_TextSeparator"></div>
-                                </span>
-                              </td>
-                            </tr>
-                            </tbody>
-                          </table>
-                          </span>
-                        </td>
-                      </tr>
-                      </tbody>
-                    </table>
-
-                  </td>
-                  <td class="MessageBox_RightTrans">
-                    <table style="width: 100%; height: 100%" cellpadding="0" cellspacing="0">
-                      <tbody>
-                      <tr>
-                        <td class="MessageBox_TopRight"></td>
-                      </tr>
-                      <tr>
-                        <td class="MessageBox_Right"></td>
-                      </tr>
-                      </tbody>
-                    </table>
-                  </td>
-                </tr>
-                <tr>
-                  <td rowspan="2" class="MessageBox_BottomLeft">
-                  </td>
-                  <td class="MessageBox_BottomTrans MessageBox_bg">
-                  </td>
-                  <td rowspan="2" class="MessageBox_BottomRight">
-                  </td>
-                </tr>
-                <tr>
-                  <td class="MessageBox_Bottom">
-                  </td>
-                </tr>
-                </tbody>
-              </table>
-
-            </td>
-            <td class="MessageBox_RightMargin"></td>
-          </tr>
-          <tr class="MessageBox_BottomMargin">
-            <td class="MessageBox_LeftMargin"></td>
-            <td></td>
-            <td class="MessageBox_RightMargin"></td>
-          </tr>
-          </tbody>
-        </table>
-
-
-      </td>
-    </tr>
-  </table>
-</div>
-
-<table cellspacing="0" cellpadding="0" width="100%">
-
-  <tr>
-    <td>
-
-
-
-          <div style="width: 100%; overflow: auto;" id="openbravo_tree">
-            <div id="paramMenu"> 
-
-            </div>
-          </div>
-
-
-
-    </td>
-  </tr>
-</table>
-
-<script language="JavaScript" type="text/javascript">
-  treeObj = new JSDragDropTree();
-  treeObj.setTreeId('openbravo_tree');
-  treeObj.setMaximumDepth(10);
-  treeObj.setMessageMaximumDepthReached('Maximum depth reached');
-  treeObj.setImageFolder('../web/images/');
-  treeObj.initTree();
-  treeObj.expandAll();
-  treeObj.collapseAll();
-  treeObj.expandNode(0);
-</script>
-
-<div onmouseover="setScroll(true); scrollTree('down');" onmouseout="setScroll(false);">
-  <table cellspacing="0" cellpadding="0" width="100%" id="bottomArea">
-
-    <tr>
-      <td>
-        <table cellspacing="0" cellpadding="0" class="Popup_ContentPane_SeparatorBar">
-          <tr>
-            <td class="Popup_SeparatorBar_bg"></td>
-          </tr>
-        </table>
-      </td>
-    </tr>
-    <tr>
-      <td>
-        <div class="Popup_ContentPane_Client" style="overflow: auto;" id="client_button">
-          <table cellspacing="0" cellpadding="0" class="Popup_Client_TablePopup">
-
-            <tr>
-              <td class="TableEdition_OneCell_width"></td>
-              <td class="TableEdition_OneCell_width"></td>
-              <td class="TableEdition_OneCell_width"></td>
-              <td class="TableEdition_OneCell_width"></td>
-            </tr>
-
-            <tr>
-
-              <td class="Button_LeftAlign_ContentCell">
-
-                  <div id="unlockbutton" style="display: none;">
-                    <button type="button" 
-                      class="ButtonLink" 
-                      onclick="UnlockTree();" 
-                      onfocus="buttonEvent('onfocus', this); window.status='Unlock Tree'; return true;" 
-                      onblur="buttonEvent('onblur', this);" 
-                      onkeyup="buttonEvent('onkeyup', this);" 
-                      onkeydown="buttonEvent('onkeydown', this);" 
-                      onkeypress="buttonEvent('onkeypress', this);" 
-                      onmouseup="buttonEvent('onmouseup', this);" 
-                      onmousedown="buttonEvent('onmousedown', this);" 
-                      onmouseover="buttonEvent('onmouseover', this); window.status='Unlock Tree'; return true;" 
-                      onmouseout="buttonEvent('onmouseout', this);">
-                      <table class="Button">
-                        <tr>
-                          <td class="Button_left"><img class="Button_Icon Button_Icon_unlock" alt="Unlock Tree" title="Unlock Tree" src="../../../../../web/images/blank.gif" border="0" id="buttonOk" /></td>
-                          <td class="Button_text">Unlock Tree</td>
-                          <td class="Button_right"></td>
-                        </tr>
-                      </table>
-                    </button>
-                  </div>
-
-                  <div id="lockbutton" style="display: none;">
-                    <button type="button" 
-                      class="ButtonLink" 
-                      onclick="LockTree();" 
-                      onfocus="buttonEvent('onfocus', this); window.status='Lock Tree'; return true;" 
-                      onblur="buttonEvent('onblur', this);" 
-                      onkeyup="buttonEvent('onkeyup', this);" 
-                      onkeydown="buttonEvent('onkeydown', this);" 
-                      onkeypress="buttonEvent('onkeypress', this);" 
-                      onmouseup="buttonEvent('onmouseup', this);" 
-                      onmousedown="buttonEvent('onmousedown', this);" 
-                      onmouseover="buttonEvent('onmouseover', this); window.status='Lock Tree'; return true;" 
-                      onmouseout="buttonEvent('onmouseout', this);">
-                      <table class="Button">
-                        <tr>
-                          <td class="Button_left"><img class="Button_Icon Button_Icon_lock" alt="Lock Tree" title="Lock Tree" src="../../../../../web/images/blank.gif" border="0" id="buttonOk" /></td>
-                          <td class="Button_text">Lock Tree</td>
-                          <td class="Button_right"></td>
-                        </tr>
-                      </table>
-                    </button>
-                  </div>
-
-              </td>
-
-              <td class="Button_RightAlign_ContentCell">
-
-                  <div>
-                    <button type="button" 
-                      class="ButtonLink" 
-                      onclick="treeObj.expandAll();" 
-                      onfocus="buttonEvent('onfocus', this); window.status='Expand all'; return true;" 
-                      onblur="buttonEvent('onblur', this);" 
-                      onkeyup="buttonEvent('onkeyup', this);" 
-                      onkeydown="buttonEvent('onkeydown', this);" 
-                      onkeypress="buttonEvent('onkeypress', this);" 
-                      onmouseup="buttonEvent('onmouseup', this);" 
-                      onmousedown="buttonEvent('onmousedown', this);" 
-                      onmouseover="buttonEvent('onmouseover', this); window.status='Expand all'; return true;" 
-                      onmouseout="buttonEvent('onmouseout', this);">
-                      <table class="Button">
-                        <tr>
-                          <td class="Button_left"><img class="Button_Icon Button_Icon_expand" alt="Expand all" title="Expand all" src="../../../../../web/images/blank.gif" border="0" id="buttonOk" /></td>
-                          <td class="Button_text">Expand all</td>
-                          <td class="Button_right"></td>
-                        </tr>
-                      </table>
-                    </button>
-                  </div>
-
-              </td>
-              <td class="Button_LeftAlign_ContentCell">
-
-                  <div>
-                    <button type="button" 
-                      class="ButtonLink" 
-                      onclick="treeObj.collapseAll(); treeObj.expandNode(0);" 
-                      onfocus="buttonEvent('onfocus', this); window.status='Collapse all'; return true;" 
-                      onblur="buttonEvent('onblur', this);" 
-                      onkeyup="buttonEvent('onkeyup', this);" 
-                      onkeydown="buttonEvent('onkeydown', this);" 
-                      onkeypress="buttonEvent('onkeypress', this);" 
-                      onmouseup="buttonEvent('onmouseup', this);" 
-                      onmousedown="buttonEvent('onmousedown', this);" 
-                      onmouseover="buttonEvent('onmouseover', this); window.status='Collapse all'; return true;" 
-                      onmouseout="buttonEvent('onmouseout', this);">
-                      <table class="Button">
-                        <tr>
-                          <td class="Button_left"><img class="Button_Icon Button_Icon_contract" alt="Collapse all" title="Collapse all" src="../../../../../web/images/blank.gif" border="0" id="buttonOk" /></td>
-                          <td class="Button_text">Collapse all</td>
-                          <td class="Button_right"></td>
-                        </tr>
-                      </table>
-                    </button>
-                  </div>
-
-              </td>
-
-              <td class="Button_RightAlign_ContentCell">
-
-                  <div>
-                    <button type="button" 
-                      class="ButtonLink" 
-                      onclick="closeThis();" 
-                      onfocus="buttonEvent('onfocus', this); window.status='Close'; return true;" 
-                      onblur="buttonEvent('onblur', this);" 
-                      onkeyup="buttonEvent('onkeyup', this);" 
-                      onkeydown="buttonEvent('onkeydown', this);" 
-                      onkeypress="buttonEvent('onkeypress', this);" 
-                      onmouseup="buttonEvent('onmouseup', this);" 
-                      onmousedown="buttonEvent('onmousedown', this);" 
-                      onmouseover="buttonEvent('onmouseover', this); window.status='Close'; return true;" 
-                      onmouseout="buttonEvent('onmouseout', this);">
-                      <table class="Button">
-                        <tr>
-                          <td class="Button_left"><img class="Button_Icon Button_Icon_cancel" alt="Close" title="Close" src="../../../../../web/images/blank.gif" border="0" id="buttonOk" /></td>
-                          <td class="Button_text Button_width">Close</td>
-                          <td class="Button_right"></td>
-                        </tr>
-                      </table>
-                    </button>
-                  </div>
-
-              </td>
-
-
-            </tr>
-          </table>
-        </div>
-      </td>
-    </tr>
-  </table>
-</div>
-
-  <form name="frmMain" action="WindowTree.html" method="post">
-    <input type="hidden" name="myAction" value="" id="fieldPage">
-    <input type="hidden" name="Command">
-    <input type="hidden" name="inpparentId">
-    <input type="hidden" name="inpKey" id="fieldKeyField">
-    <input type="hidden" name="inpTabId" value="" id="fieldTabID">
-    <input type="hidden" name="inptreeId" value="" id="fieldTreeID">
-    <input type="hidden" name="inpTop">
-    <input type="hidden" name="inpLink">
-    <input type="hidden" name="inpChild">
-  </form>
-
-</body>
-</html>
--- a/src/org/openbravo/erpCommon/utility/WindowTree.java	Tue May 19 15:31:03 2020 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,578 +0,0 @@
-/*
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2019 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
- */
-package org.openbravo.erpCommon.utility;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.inject.Inject;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.hibernate.ScrollMode;
-import org.hibernate.ScrollableResults;
-import org.hibernate.criterion.Restrictions;
-import org.openbravo.base.secureApp.HttpSecureAppServlet;
-import org.openbravo.base.secureApp.VariablesSecureApp;
-import org.openbravo.base.structure.BaseOBObject;
-import org.openbravo.client.application.GlobalMenu;
-import org.openbravo.dal.core.OBContext;
-import org.openbravo.dal.service.OBCriteria;
-import org.openbravo.dal.service.OBDal;
-import org.openbravo.dal.service.OBQuery;
-import org.openbravo.data.Sqlc;
-import org.openbravo.database.ConnectionProvider;
-import org.openbravo.model.ad.datamodel.Table;
-import org.openbravo.model.ad.ui.Tab;
-import org.openbravo.model.ad.utility.Tree;
-import org.openbravo.utils.Replace;
-import org.openbravo.xmlEngine.XmlDocument;
-
-/**
- * @author Fernando Iriazabal
- * 
- *         Manage the composition of the tree data for the tree window types.
- */
-public class WindowTree extends HttpSecureAppServlet {
-  private static final long serialVersionUID = 1L;
-  private static final String CHILD_SHEETS = "frameWindowTreeF3";
-  private static List<String> nodeIdList = new ArrayList<>();
-
-  @Inject
-  GlobalMenu menu;
-
-  @Override
-  public void init(ServletConfig config) {
-    super.init(config);
-    boolHist = false;
-  }
-
-  @Override
-  public void doPost(HttpServletRequest request, HttpServletResponse response)
-      throws IOException, ServletException {
-    VariablesSecureApp vars = new VariablesSecureApp(request);
-
-    // Checking the window invoking the tree is accessible
-    if (!hasGeneralAccess(vars, "W", vars.getStringParameter("inpTabId"))) {
-      bdErrorGeneralPopUp(request, response, Utility.messageBD(this, "Error", vars.getLanguage()),
-          Utility.messageBD(this, "AccessTableNoView", vars.getLanguage()));
-    }
-
-    if (vars.commandIn("DEFAULT", "TAB")) {
-      String strTabId = vars.getGlobalVariable("inpTabId", "WindowTree|tabId");
-      ADTreeData treeData = new ADTreeData(strTabId);
-      treeData.initializeData(vars, this);
-      if (treeData.treeId == null) {
-        advisePopUp(request, response, "ERROR",
-            Utility.messageBD(this, "Error", vars.getLanguage()),
-            Utility.messageBD(this, "AccessTableNoView", vars.getLanguage()));
-      } else {
-        printPageDataSheet(response, vars, treeData);
-      }
-    } else if (vars.commandIn("ASSIGN")) {
-      String strTabId = vars.getRequiredStringParameter("inpTabId");
-      String strTop = vars.getRequiredStringParameter("inpTop");
-      String strLink = vars.getRequiredStringParameter("inpLink");
-      String strChild = vars.getStringParameter("inpChild", "N");
-      String strResult = WindowTreeChecks.checkChanges(this, vars, strTabId, strTop, strLink,
-          strChild.equals("Y"));
-      if (strResult.equals("")) {
-        changeNode(vars, strTabId, strTop, strLink, strChild);
-      } else {
-        vars.setSessionValue("WindowTree|message", strResult);
-      }
-      vars.setSessionValue("WindowTree|tabId", strTabId);
-      PrintWriter out = response.getWriter();
-
-      if (strResult != "") {
-        // create OBError and serialize it using JSON
-        OBError error = new OBError();
-        error.setType("Error");
-        error.setTitle("Error");
-        error.setMessage(strResult);
-        strResult = error.toJSON().toString();
-      }
-
-      out.print(strResult);
-      out.close();
-    } else {
-      throw new ServletException();
-    }
-  }
-
-  /**
-   * Main method to build the html for the tree.
-   * 
-   * @param vars
-   *          Handler for the session info.
-   * @param key
-   *          key column name.
-   * @param editable
-   *          is editable?
-   * @param strTabId
-   *          id of the tab.
-   * @return String html with the tree.
-   * @throws ServletException
-   */
-  private String loadNodes(VariablesSecureApp vars, ADTreeData treeData, boolean editable)
-      throws ServletException {
-    if (treeData.treeId == null) {
-      log4j.error("WindowTree.loadNodes() - Unknown TreeNode: TreeType " + treeData.treeType
-          + " - TreeKey " + treeData.key);
-      throw new ServletException("WindowTree.loadNodes() - Unknown TreeNode");
-    }
-    StringBuilder nodesMenu = new StringBuilder();
-    if (log4j.isDebugEnabled()) {
-      log4j.debug("WindowTree.loadNodes() - TreeType: " + treeData.treeType + " || TreeID: "
-          + treeData.treeId);
-    }
-    nodesMenu.append("\n<ul class=\"dhtmlgoodies_tree\">\n");
-    nodesMenu.append(WindowTreeUtility.addNodeElement(treeData.treeName, treeData.treeDescription,
-        CHILD_SHEETS, true, "", strDireccion,
-        "clickItem(0, '" + Replace.replace(treeData.treeName, "'", "\\'") + "', 'N');",
-        "dblClickItem(0);", true, "0", ""));
-    WindowTreeData[] wtd = WindowTreeUtility.getTree(this, vars, treeData.treeType, treeData.treeId,
-        editable, "", "", treeData.tabId);
-    Map<String, List<WindowTreeData>> wtdTree = buildTree(wtd);
-    nodesMenu.append(generateTree(wtd, wtdTree, strDireccion, "0", true, treeData.tabId));
-    nodesMenu.append("\n</ul>\n");
-    nodeIdList = null;
-    return nodesMenu.toString();
-  }
-
-  /**
-   * Generates the tree for the html.
-   * 
-   * @param data
-   *          Array with the tree elements.
-   * @param direccion
-   *          String with the path for the urls.
-   * @param indice
-   *          String with the index.
-   * @param isFirst
-   *          Indicates if is the first or not.
-   * @return String html with the tree.
-   */
-  private String generateTree(WindowTreeData[] data, Map<String, List<WindowTreeData>> wtdTree,
-      String direccion, String indice, boolean isFirst, String strTabId) {
-    boolean localIsFirst = isFirst;
-    String localIndice = indice;
-    if (data == null || data.length == 0) {
-      return "";
-    }
-    if (log4j.isDebugEnabled()) {
-      log4j.debug("WindowTree.generateTree() - data: " + data.length);
-    }
-    if (localIndice == null) {
-      localIndice = "0";
-    }
-    boolean hayDatos = false;
-    StringBuilder strResultado = new StringBuilder();
-    strResultado.append("<ul>");
-    localIsFirst = false;
-    List<WindowTreeData> subList = wtdTree.get(localIndice);
-    if (subList != null) {
-      List<WindowTreeData> filteredSubList = applyWhereClause(subList, strTabId);
-      for (WindowTreeData elem : subList) {
-        hayDatos = true;
-        String strHijos = generateTree(data, wtdTree, direccion, elem.nodeId, localIsFirst,
-            strTabId);
-        // if elem is present in filtered sublist click action is allowed, else disabled
-        if (filteredSubList.contains(elem)) {
-          strResultado
-              .append(WindowTreeUtility.addNodeElement(elem.name, elem.description, CHILD_SHEETS,
-                  elem.issummary.equals("Y"), WindowTreeUtility.windowType(elem.action), direccion,
-                  "clickItem('" + elem.nodeId + "', '" + Replace.replace(elem.name, "'", "\\'")
-                      + "', '" + elem.issummary + "');",
-                  "dblClickItem('" + elem.nodeId + "');", !strHijos.equals(""), elem.nodeId,
-                  elem.action));
-        } else {
-          strResultado.append(WindowTreeUtility.addNodeElement(elem.name, elem.description,
-              CHILD_SHEETS, elem.issummary.equals("Y"), WindowTreeUtility.windowType(elem.action),
-              direccion, null, null, !strHijos.equals(""), elem.nodeId, elem.action));
-        }
-        strResultado.append(strHijos);
-      }
-    }
-    strResultado.append("</li></ul>");
-    return (hayDatos ? strResultado.toString() : "");
-  }
-
-  /*
-   * Retrieves the tab level hqlWhereClause and applies them to the current TreeData list and
-   * returns the filtered list. sqlWhereClause is not applied in the tab, so not applied here. Uses
-   * a global static list nodeIdList to fetch it only once though the method is called recursively.
-   */
-  private List<WindowTreeData> applyWhereClause(List<WindowTreeData> subList, String strTabId) {
-    String entityName = null, hqlWhereClause = null;
-    try {
-      OBContext.setAdminMode();
-      Tab tabData = OBDal.getInstance().get(org.openbravo.model.ad.ui.Tab.class, strTabId);
-      if (tabData != null) {
-        entityName = tabData.getTable().getName();
-        hqlWhereClause = tabData.getHqlwhereclause();
-      }
-    } catch (Exception e) {
-      log4j.error("Exception while retrieving hqlWhereClause " + e);
-    } finally {
-      OBContext.restorePreviousMode();
-    }
-
-    List<WindowTreeData> newSubList = new ArrayList<WindowTreeData>();
-    if (hqlWhereClause != null && !hqlWhereClause.trim().isEmpty()) {
-      hqlWhereClause = hqlWhereClause.replaceAll("\\be.", "");
-      OBQuery<BaseOBObject> entityResults = OBDal.getInstance()
-          .createQuery("" + entityName + "", hqlWhereClause);
-      if (nodeIdList == null) {
-        nodeIdList = new ArrayList<>();
-      }
-
-      if (nodeIdList.isEmpty() && nodeIdList.size() != entityResults.count()) {
-        ScrollableResults entityData = entityResults.scroll(ScrollMode.FORWARD_ONLY);
-        int clearEachLoops = 100;
-        int i = 0;
-        try {
-          while (entityData.next()) {
-            i++;
-            BaseOBObject entity = (BaseOBObject) entityData.get()[0];
-            if (entity.getId() != null) {
-              nodeIdList.add(entity.getId().toString());
-            }
-            if (i % clearEachLoops == 0) {
-              OBDal.getInstance().getSession().clear();
-            }
-          }
-        } finally {
-          entityData.close();
-        }
-      }
-
-      for (WindowTreeData elem : subList) {
-        if (nodeIdList.contains(elem.nodeId)) {
-          newSubList.add(elem);
-        }
-      }
-    } else {
-      newSubList = subList;
-    }
-    return newSubList;
-  }
-
-  private static Map<String, List<WindowTreeData>> buildTree(WindowTreeData[] input) {
-    Map<String, List<WindowTreeData>> resMap = new HashMap<>();
-
-    for (WindowTreeData elem : input) {
-      List<WindowTreeData> list = resMap.get(elem.parentId);
-      if (list == null) {
-        list = new ArrayList<>();
-      }
-      list.add(elem);
-      resMap.put(elem.parentId, list);
-    }
-
-    return resMap;
-  }
-
-  /**
-   * Prints the tree page.
-   * 
-   * @param response
-   *          Handler to the response.
-   * @param vars
-   *          Handler for the session info.
-   * @param TabId
-   *          Tab id.
-   * @throws IOException
-   * @throws ServletException
-   */
-  private void printPageDataSheet(HttpServletResponse response, VariablesSecureApp vars,
-      ADTreeData treeData) throws IOException, ServletException {
-    if (log4j.isDebugEnabled()) {
-      log4j.debug("Output: Tree's screen for the tab: " + treeData.tabId);
-    }
-    OBError defaultInfo = new OBError();
-    defaultInfo.setType("INFO");
-    defaultInfo.setTitle(Utility.messageBD(this, "Info", vars.getLanguage()));
-    defaultInfo.setMessage(Utility.messageBD(this, "TreeInfo", vars.getLanguage()));
-    vars.setMessage("WindowTree", defaultInfo);
-
-    XmlDocument xmlDocument = xmlEngine
-        .readXmlTemplate("org/openbravo/erpCommon/utility/WindowTree")
-        .createXmlDocument();
-
-    xmlDocument.setParameter("language", "defaultLang=\"" + vars.getLanguage() + "\";");
-    xmlDocument.setParameter("directory", "var baseDirectory = \"" + strReplaceWith + "/\";\n");
-    xmlDocument.setParameter("theme", vars.getTheme());
-
-    WindowTreeData[] data = WindowTreeData.selectTabName(this, treeData.tabId);
-
-    xmlDocument.setParameter("description", data[0].name);
-    xmlDocument.setParameter("page", Utility.getTabURL(treeData.tabId, "E", true));
-    xmlDocument.setParameter("menu",
-        loadNodes(vars, treeData, WindowTreeData.selectEditable(this, treeData.tabId).equals("Y")));
-    xmlDocument.setParameter("treeID", treeData.treeId);
-    xmlDocument.setParameter("tabID", treeData.tabId);
-    String key = "inp" + Sqlc.TransformaNombreColumna(treeData.key);
-    xmlDocument.setParameter("keyField", key);
-    xmlDocument.setParameter("keyFieldScript",
-        "function getKeyField() {\n return document.frmMain." + key + ";\n}\n");
-
-    try {
-      OBError myMessage = vars.getMessage("WindowTree");
-      vars.removeMessage("WindowTree");
-      if (myMessage != null) {
-        xmlDocument.setParameter("messageType", myMessage.getType());
-        xmlDocument.setParameter("messageTitle", myMessage.getTitle());
-        xmlDocument.setParameter("messageMessage", myMessage.getMessage());
-      }
-    } catch (Exception ex) {
-      log4j.error(ex.getMessage(), ex);
-    }
-
-    response.setContentType("text/html; charset=UTF-8");
-    PrintWriter out = response.getWriter();
-    out.println(xmlDocument.print());
-    out.close();
-  }
-
-  /**
-   * Makes the change of position of the elements in the tree.
-   * 
-   * It positions the node and moves down all the nodes after this one.
-   * 
-   * For menu tree it looks whether the current node and the ones after that are within a module in
-   * development. It searchs the first node after the current one that is not in development and
-   * modifies the seqno for the current one (regardless it is in development or not) and the ones
-   * bellow it that are in development.
-   * 
-   * @param vars
-   *          Handler for the session info.
-   * @param strTabId
-   *          Tab id.
-   * @param strTop
-   *          Parent node id.
-   * @param strLink
-   *          Id of the node to change.
-   * @param strChild
-   *          String indicating if is a child or not of the parent node (Y|N).
-   * @throws ServletException
-   */
-  private void changeNode(VariablesSecureApp vars, String strTabId, String strTop, String strLink,
-      String strChild) throws ServletException {
-    String key = WindowTreeData.selectKey(this, strTabId);
-    String TreeType = WindowTreeUtility.getTreeType(key);
-    String TreeID = "";
-    String strParent = strTop;
-    boolean editable = WindowTreeData.selectEditable(this, strTabId).equals("Y");
-
-    if ("MM".equals(TreeType)) {
-      // Editing Application Menu tree, invalidate menu cache manually as this update is not
-      // captured by Listener because it is not done though DAL
-      menu.invalidateCache();
-    }
-
-    // Calculating the TreeID
-    try {
-      OBContext.setAdminMode(true);
-
-      Tab tab = OBDal.getInstance().get(Tab.class, strTabId);
-      Table table = tab.getTable();
-      OBCriteria<Tree> adTreeCriteria = OBDal.getInstance().createCriteria(Tree.class);
-      adTreeCriteria.add(Restrictions.eq(Tree.PROPERTY_TABLE, table));
-      adTreeCriteria
-          .add(Restrictions.eq(Tree.PROPERTY_CLIENT, OBContext.getOBContext().getCurrentClient()));
-      adTreeCriteria.setFilterOnReadableOrganization(false);
-      Tree adTree = (Tree) adTreeCriteria.uniqueResult();
-
-      if (adTree != null) {
-        TreeID = adTree.getId();
-        TreeType = adTree.getTable().getTreeType();
-      } else {
-        WindowTreeData[] data = WindowTreeData.selectTreeID(this,
-            Utility.getContext(this, vars, "#User_Client", ""), TreeType);
-        if (data == null || data.length == 0) {
-          log4j.error("WindowTree.loadNodes() - Unknown TreeNode");
-          throw new ServletException("WindowTree.loadNodes() - Unknown TreeNode");
-        } else {
-          TreeID = data[0].id;
-        }
-      }
-
-    } finally {
-      OBContext.restorePreviousMode();
-    }
-
-    // Calculating the parent
-    if (!strTop.equals("0")) {
-      WindowTreeData[] data = WindowTreeUtility.getTree(this, vars, TreeType, TreeID, editable, "",
-          strTop, strTabId);
-      if (data == null || data.length == 0) {
-        log4j.error("WindowTree.loadNodes() - Unknown Top Node");
-        throw new ServletException("WindowTree.loadNodes() - Unknown Top Node");
-      }
-
-      if (!data[0].issummary.equals("Y") || !strChild.equals("Y")) {
-        strParent = data[0].parentId;
-      }
-    } else {
-      strParent = strTop;
-    }
-    WindowTreeData[] data = WindowTreeUtility.getTree(this, vars, TreeType, TreeID, editable,
-        strParent, "", strTabId);
-    int seqNo = 0;
-    int add = 10;
-    try {
-      if (data == null || data.length == 0) {
-        WindowTreeUtility.setNode(this, vars, TreeType, TreeID, strParent, strLink,
-            Integer.toString(seqNo));
-      } else {
-        boolean updated = false;
-        boolean finish = false;
-        if (strParent.equals(strTop)) {
-          seqNo += add;
-          WindowTreeUtility.setNode(this, vars, TreeType, TreeID, strParent, strLink,
-              Integer.toString(seqNo));
-          updated = true;
-        }
-        for (int i = 0; !finish && i < data.length; i++) {
-          if (!data[i].nodeId.equals(strLink)) {
-
-            if (updated && !finish) { // update only elements after
-              // the current one
-              if (data[i].isindevelopment == null || data[i].isindevelopment.equals("")
-                  || data[i].isindevelopment.equals("Y")) {
-                seqNo += add;
-                WindowTreeUtility.setNode(this, vars, TreeType, TreeID, data[i].parentId,
-                    data[i].nodeId, Integer.toString(seqNo));
-              } else {
-                finish = true; // update elements till one is
-                // not in developement, then
-                // finish
-              }
-            }
-
-            if (!updated && data[i].nodeId.equals(strTop)) {
-
-              // Calculate the addition for the range of modules
-              // in development
-              int j = 0;
-
-              for (j = i + 1; j < data.length
-                  && (data[j].isindevelopment == null || data[j].isindevelopment.equals("")
-                      || data[j].isindevelopment.equals("Y")); j++) {
-                ;
-              }
-              if (j == data.length) {
-                add = 10; // it is at the end it can be expanded
-                // without problem
-              } else {
-                add = Float
-                    .valueOf(((Integer.valueOf(data[j].seqno) - Integer.valueOf(data[i].seqno))
-                        / (j - i + 1)))
-                    .intValue();
-              }
-
-              // Set the current node in its posisiton
-              if (i == 0) {
-                seqNo = 10;
-              } else {
-                seqNo = Integer.parseInt(data[i].seqno) + add;
-              }
-              WindowTreeUtility.setNode(this, vars, TreeType, TreeID, strParent, strLink,
-                  Integer.toString(seqNo));
-              updated = true;
-            }
-          }
-        }
-        if (!updated) {
-          WindowTreeUtility.setNode(this, vars, TreeType, TreeID, strParent, strLink,
-              Integer.toString(seqNo));
-        }
-      }
-    } catch (ServletException e) {
-      log4j.error("WindowTree.changeNode() - Couldn't change the node: " + strLink);
-      log4j.error("WindowTree.setNode() - error: " + e);
-      throw new ServletException(e);
-    }
-  }
-
-  @Override
-  public String getServletInfo() {
-    return "Servlet that presents the tree of a TreeNode windo windoww";
-  } // end of getServletInfo() method
-
-  private class ADTreeData {
-    private String tabId;
-    private String treeId;
-    private String treeName;
-    private String treeType;
-    private String treeDescription;
-    private String key;
-
-    private ADTreeData(String tabId) {
-      this.tabId = tabId;
-    }
-
-    private void initializeData(VariablesSecureApp vars, ConnectionProvider connectionProvider)
-        throws ServletException {
-      initFromADTree();
-      if (treeId == null) {
-        key = WindowTreeData.selectKey(connectionProvider, tabId);
-        treeType = WindowTreeUtility.getTreeType(key);
-        WindowTreeData[] data = WindowTreeData.selectTreeID(connectionProvider,
-            Utility.getContext(connectionProvider, vars, "#User_Client", ""), treeType);
-        if (data != null && data.length > 0) {
-          treeId = data[0].id;
-          treeName = data[0].name;
-          treeDescription = data[0].description;
-        }
-      }
-    }
-
-    private void initFromADTree() {
-      try {
-        OBContext.setAdminMode(true);
-        Tab tab = OBDal.getInstance().get(Tab.class, tabId);
-        Table table = tab.getTable();
-        OBCriteria<Tree> adTreeCriteria = OBDal.getInstance().createCriteria(Tree.class);
-        adTreeCriteria.add(Restrictions.eq(Tree.PROPERTY_TABLE, table));
-        adTreeCriteria.add(
-            Restrictions.eq(Tree.PROPERTY_CLIENT, OBContext.getOBContext().getCurrentClient()));
-        adTreeCriteria.setFilterOnReadableOrganization(false);
-        Tree adTree = (Tree) adTreeCriteria.uniqueResult();
-        if (adTree == null) {
-          return;
-        }
-        treeId = adTree.getId();
-        treeName = adTree.getName();
-        treeDescription = adTree.getDescription();
-        treeType = adTree.getTypeArea();
-        key = "";
-      } finally {
-        OBContext.restorePreviousMode();
-      }
-    }
-  }
-}
--- a/src/org/openbravo/erpCommon/utility/WindowTree.xml	Tue May 19 15:31:03 2020 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2010 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
--->
-<REPORT>
-	<template file="WindowTree.html"/>
-  <PARAMETER id="paramDescription" name="description" default=""/>
-	<PARAMETER id="paramLanguage" name="language" default=""/>
-	<PARAMETER id="paramDirectory" name="directory" default=""/>
-	<PARAMETER id="paramCSS" name="theme" attribute="href" replace="Default"/>
-	<PARAMETER id="paramMenu" name="menu"/>
-  <PARAMETER id="messageBoxID" name="messageType" attribute="class" replace="yy" default="HIDDEN"/>
-  <PARAMETER id="messageBoxIDTitle" name="messageTitle" default=""/>
-  <PARAMETER id="messageBoxIDMessage" name="messageMessage" default=""/>
-	<PARAMETER id="fieldTreeID" name="treeID" attribute="value"/>
-	<PARAMETER id="fieldTabID" name="tabID" attribute="value"/>
-	<PARAMETER id="fieldPage" name="page" attribute="value"/>
-	<PARAMETER id="paramKeyField" name="keyFieldScript"/>
-	<PARAMETER id="fieldKeyField" name="keyField" attribute="name"/>
-	<DISCARD id="discard"/>
-</REPORT>
--- a/src/org/openbravo/erpCommon/utility/WindowTreeChecks.java	Tue May 19 15:31:03 2020 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,172 +0,0 @@
-/*
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2012 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
- */
-package org.openbravo.erpCommon.utility;
-
-import javax.servlet.ServletException;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.openbravo.base.secureApp.VariablesSecureApp;
-import org.openbravo.database.ConnectionProvider;
-
-/**
- * @author Fernando Iriazabal
- * 
- *         This class contains all the needed checks to make the node modifications in the tree
- *         windows.
- */
-class WindowTreeChecks {
-  static Logger log4j = LogManager.getLogger();
-
-  /**
-   * Checks the common options to decide if the change can be made.
-   * 
-   * @param conn
-   *          Handler for the database connection.
-   * @param vars
-   *          Handler for the session info.
-   * @param tabId
-   *          Tab id.
-   * @param topNodeId
-   *          Parent node id.
-   * @param nodeId
-   *          Id of the node to change.
-   * @param isChild
-   *          Is gonna be child of the parent node?
-   * @return empty string if it's ok or the message of the error.
-   * @throws ServletException
-   */
-  public static String checkChanges(ConnectionProvider conn, VariablesSecureApp vars, String tabId,
-      String topNodeId, String nodeId, boolean isChild) throws ServletException {
-    String result = "";
-    if (topNodeId.equals(nodeId)) {
-      return Utility.messageBD(conn, "SameElement", vars.getLanguage());
-    }
-    try {
-      String table = WindowTreeData.selectTableName(conn, tabId);
-      String key = WindowTreeData.selectKey(conn, tabId);
-      String TreeType = WindowTreeUtility.getTreeType(key);
-      String isReady = WindowTreeData.selectIsReady(conn, nodeId);
-
-      if (TreeType == null || TreeType.isEmpty()) {
-        return "";
-      }
-
-      if ("OO".equals(TreeType) && "Y".equals(isReady)) {
-        return Utility.messageBD(conn, "OrgIsReady", vars.getLanguage());
-      }
-      if ("AS".equals(TreeType)
-          && "Y".equals(WindowTreeData.selectIsStatic(conn, "A_ASSET", nodeId))) {
-        return OBMessageUtils.messageBD("StaticRecord");
-      }
-      if (isChild && !topNodeId.equals("0")
-          && WindowTreeChecksData.selectIsSummary(conn, table, key, topNodeId).equals("N")) {
-        return Utility.messageBD(conn, "NotIsSummary", vars.getLanguage());
-      }
-      if (log4j.isDebugEnabled()) {
-        log4j.debug("key:" + key + ", nodeId:" + nodeId + ",topNodeId:" + topNodeId);
-      }
-      String treeID;
-      WindowTreeData[] data = WindowTreeData.selectTreeID(conn, vars.getUserClient(), TreeType);
-
-      if (!(data == null || data.length == 0)) {
-        treeID = data[0].id;
-        if (!WindowTreeChecksData.isItsOwnChild(conn, treeID, topNodeId, nodeId).equals("0")) {
-          return Utility.messageBD(conn, "RecursiveTree", vars.getLanguage());
-        }
-      }
-      result = WindowTreeChecks.checkSpecificChanges(conn, vars, tabId, topNodeId, nodeId, isChild,
-          TreeType, key);
-    } catch (ServletException ex) {
-      log4j.error(ex);
-      return Utility.messageBD(conn, "Error", vars.getLanguage());
-    }
-    return result;
-  }
-
-  /**
-   * Checks the specific options of each tree type.
-   * 
-   * @param conn
-   *          Handler for the database connection.
-   * @param vars
-   *          Handler for the session info.
-   * @param tabId
-   *          Tab id.
-   * @param topNodeId
-   *          Parent node id.
-   * @param nodeId
-   *          Id of the node to change.
-   * @param isChild
-   *          Is gonna be child of the parent node?
-   * @param TreeType
-   *          Type of tree.
-   * @param key
-   *          Key column name.
-   * @return empty string if it's ok or the message of the error.
-   * @throws ServletException
-   */
-  public static String checkSpecificChanges(ConnectionProvider conn, VariablesSecureApp vars,
-      String tabId, String topNodeId, String nodeId, boolean isChild, String TreeType, String key)
-      throws ServletException {
-    String result = "";
-    if (TreeType.equals("MM")) { // Menu
-      result = WindowTreeChecksData.isMenuItemInDev(conn, nodeId) ? ""
-          : Utility.messageBD(conn, "CannotReorderNotDevModules", vars.getLanguage());
-    } else if (TreeType.equals("OO")) { // Organization
-      result = "";
-    } else if (TreeType.equals("PR")) { // Product
-      result = "";
-    } else if (TreeType.equals("PC")) { // Product Category
-      result = "";
-    } else if (TreeType.equals("BB")) { // Product BOM
-      result = "";
-    } else if (TreeType.equals("EV")) { // Element Value
-      result = "";
-    } else if (TreeType.equals("BP")) { // BusinessPartner
-      result = "";
-    } else if (TreeType.equals("MC")) { // Campaign
-      result = "";
-    } else if (TreeType.equals("PJ")) { // Project
-      result = "";
-    } else if (TreeType.equals("AY")) { // Activity
-      result = "";
-    } else if (TreeType.equals("SR")) { // Sales Region
-      result = "";
-    } else if (TreeType.equals("AR")) { // Accounting report
-      result = "";
-    } else if (TreeType.equals("AS")) { // Asset
-      result = "";
-    } else if (TreeType.equals("CC")) { // Cost Center
-      result = "";
-    } else if (TreeType.equals("OBRE_RC")) { // OBRE_Resource Category
-      result = "";
-    } else if (TreeType.equals("U1")) { // User Defined Dimension 1
-      result = "";
-    } else if (TreeType.equals("U2")) { // User Defined Dimension 2
-      result = "";
-    } else if (TreeType.equals("CH")) { // Product Characteristic
-      result = "";
-    } else {
-      result = WindowTreeChecksClient.checkChanges(conn, vars, tabId, topNodeId, nodeId, isChild,
-          TreeType, key);
-    }
-    return result;
-  }
-}
--- a/src/org/openbravo/erpCommon/utility/WindowTreeChecksClient.java	Tue May 19 15:31:03 2020 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2010 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
- */
-package org.openbravo.erpCommon.utility;
-
-import javax.servlet.ServletException;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.openbravo.base.secureApp.VariablesSecureApp;
-import org.openbravo.database.ConnectionProvider;
-
-/**
- * @author Fernando Iriazabal
- * 
- *         Class defined to implement the specific checks of each client.
- */
-class WindowTreeChecksClient {
-  static Logger log4j = LogManager.getLogger();
-
-  /**
-   * Checks the specific options of each tree type in the client.
-   * 
-   * @param conn
-   *          Handler for the database connection.
-   * @param vars
-   *          Handler for the session info.
-   * @param tabId
-   *          Tab id.
-   * @param topNodeId
-   *          Parent node id.
-   * @param nodeId
-   *          Id of the node to change.
-   * @param isChild
-   *          Is gonna be child of the parent node?
-   * @param TreeType
-   *          Type of tree.
-   * @param key
-   *          Key column name.
-   * @return empty string if it's ok or the message of the error.
-   * @throws ServletException
-   */
-  public static String checkChanges(ConnectionProvider conn, VariablesSecureApp vars, String tabId,
-      String topNodeId, String nodeId, boolean isChild, String TreeType, String key)
-      throws ServletException {
-    String result = "";
-    return result;
-  }
-}
--- a/src/org/openbravo/erpCommon/utility/WindowTreeChecks_data.xsql	Tue May 19 15:31:03 2020 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2010 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
--->
-
-
-
-
-
-<SqlClass name="WindowTreeChecksData" package="org.openbravo.erpCommon.utility">
-   <SqlClassComment></SqlClassComment>
-   <SqlMethod name="select" type="preparedStatement" return="multiple">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        SELECT * FROM DUAL
-      </Sql>
-   </SqlMethod>
-   <SqlMethod name="selectIsSummary" type="preparedStatement" return="String" default="N">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        SELECT ISSUMMARY 
-        FROM AD_MENU 
-        WHERE AD_MENU_ID = ?
-      </Sql>
-        <Parameter name="table" optional="true" type="replace" after="FROM " text="AD_MENU"/>
-        <Parameter name="column" optional="true" type="replace" after="WHERE " text="AD_MENU_ID"/>
-        <Parameter name="columnId"/>
-   </SqlMethod>
-   
-   <SqlMethod name="isItsOwnChild" type="preparedStatement" return="String" default="N">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        select instr(ad_parent_tree(?, ?),'|'||?||'|') AS isItsOwnChild from dual
-      </Sql>
-        <Parameter name="tree"/>
-        <Parameter name="parent"/>
-        <Parameter name="node"/>        
-   </SqlMethod>
-   
-    <SqlMethod name="isMenuItemInDev" type="preparedStatement" return="boolean">
-      <Sql>
-        SELECT COUNT(*)
-          FROM AD_MENU M, AD_MODULE O, AD_MODULE t
-         WHERE (AD_MENU_ID = ?
-                AND O.AD_MODULE_ID = M.AD_MODULE_ID
-                AND O.ISINDEVELOPMENT='Y')
-            OR (t.type='T'
-                AND t.isindevelopment='Y')
-      </Sql>
-      <Parameter name="nodeId"/>  
-   </SqlMethod>
-   
-</SqlClass>
--- a/src/org/openbravo/erpCommon/utility/WindowTreeUtility.java	Tue May 19 15:31:03 2020 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,394 +0,0 @@
-/*
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2014 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
- */
-package org.openbravo.erpCommon.utility;
-
-import javax.servlet.ServletException;
-
-import org.apache.commons.lang.StringEscapeUtils;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.openbravo.base.secureApp.VariablesSecureApp;
-import org.openbravo.data.FieldProvider;
-import org.openbravo.database.ConnectionProvider;
-import org.openbravo.utils.Replace;
-
-/**
- * @author Fernando Iriazabal
- * 
- *         Utility class for the window tree type.
- */
-class WindowTreeUtility {
-  static Logger log4j = LogManager.getLogger();
-
-  /**
-   * Gets the tree type.
-   * 
-   * @param keyColumnName
-   *          Name of the column key.
-   * @return String with the tree type.
-   */
-  public static String getTreeType(String keyColumnName) {
-    if (log4j.isDebugEnabled()) {
-      log4j.debug("WindowTreeUtility.getTreeID() - key Column: " + keyColumnName);
-    }
-    if (keyColumnName == null || keyColumnName.length() == 0) {
-      return "";
-    }
-    String TreeType = "";
-    if (keyColumnName.equals("AD_Menu_ID")) {
-      TreeType = "MM";
-    } else if (keyColumnName.equals("C_ElementValue_ID")) {
-      TreeType = "EV";
-    } else if (keyColumnName.equals("C_BPartner_ID")) {
-      TreeType = "BP";
-    } else if (keyColumnName.equals("AD_Org_ID")) {
-      TreeType = "OO";
-    } else if (keyColumnName.equals("C_Project_ID")) {
-      TreeType = "PJ";
-    } else if (keyColumnName.equals("M_Product_Category_ID")) {
-      TreeType = "PC";
-    } else if (keyColumnName.equals("C_Costcenter_ID")) {
-      TreeType = "CC";
-    } else if (keyColumnName.equals("User1_ID")) {
-      TreeType = "U1";
-    } else if (keyColumnName.equals("User2_ID")) {
-      TreeType = "U2";
-    } else if (keyColumnName.equals("M_BOM_ID")) {
-      TreeType = "BB";
-    } else if (keyColumnName.equals("C_SalesRegion_ID")) {
-      TreeType = "SR";
-    } else if (keyColumnName.equals("C_Campaign_ID")) {
-      TreeType = "MC";
-    } else if (keyColumnName.equals("C_Activity_ID")) {
-      TreeType = "AY";
-    } else if (keyColumnName.equals("AD_Accountingrpt_Element_ID")) {
-      TreeType = "AR";
-    } else if (keyColumnName.equals("C_Tax_Report_ID")) {
-      TreeType = "TR";
-    } else if (keyColumnName.equals("A_Asset_ID")) {
-      TreeType = "AS";
-    } else if (keyColumnName.equals("Obre_Resource_Category_ID")) {
-      TreeType = "OBRE_RC";
-    } else if (keyColumnName.equals("M_Ch_Value_ID")) {
-      TreeType = "CH";
-    } else {
-      TreeType = "";
-    }
-    if (TreeType.equals("")) {
-      log4j.warn("WindowTreeUtility.getTreeID() - Could not map " + keyColumnName
-          + ". It could be a tree that uses the new tree structure");
-    }
-    return TreeType;
-  }
-
-  /**
-   * Gets the array with the tree elements.
-   * 
-   * @param conn
-   *          Handler for the database connection.
-   * @param vars
-   *          Handler for the session info.
-   * @param TreeType
-   *          The type of tree.
-   * @param TreeID
-   *          The id of the tree.
-   * @param editable
-   *          is editable?
-   * @param strParentID
-   *          Parent id node (optional).
-   * @param strNodeId
-   *          The node to search (optional).
-   * @param strTabID
-   *          Id of the tab.
-   * @return Array with the tree elements.
-   * @throws ServletException
-   */
-  public static WindowTreeData[] getTree(ConnectionProvider conn, VariablesSecureApp vars,
-      String TreeType, String TreeID, boolean editable, String strParentID, String strNodeId,
-      String strTabID) throws ServletException {
-    if (log4j.isDebugEnabled()) {
-      log4j.debug("WindowTreeUtility.getTree() - TreeID: " + TreeID);
-    }
-    WindowTreeData[] data = null;
-    String strEditable = (editable ? "editable" : "");
-    if (TreeType.equals("MM")) {
-      data = WindowTreeData.selectTrl(conn, vars.getLanguage(), strEditable, strParentID, strNodeId,
-          TreeID);
-    } else if (TreeType.equals("OO")) {
-      data = WindowTreeData.selectOrg(conn, strEditable, strParentID, strNodeId, TreeID);
-    } else if (TreeType.equals("PC")) {
-      data = WindowTreeData.selectProductCategory(conn, strEditable, strParentID, strNodeId,
-          TreeID);
-    } else if (TreeType.equals("CC")) {
-      data = WindowTreeData.selectCostcenter(conn, strEditable, strParentID, strNodeId, TreeID);
-    } else if (TreeType.equals("U1")) {
-      data = WindowTreeData.selectUser1(conn, strEditable, strParentID, strNodeId, TreeID);
-    } else if (TreeType.equals("U2")) {
-      data = WindowTreeData.selectUser2(conn, strEditable, strParentID, strNodeId, TreeID);
-    } else if (TreeType.equals("BB")) {
-      data = WindowTreeData.selectBOM(conn, strEditable, strParentID, strNodeId, TreeID);
-    } else if (TreeType.equals("EV")) {
-      String strElementId = vars
-          .getSessionValue(Utility.getWindowID(conn, strTabID) + "|C_Element_ID");
-      data = WindowTreeData.selectElementValue(conn, vars.getLanguage(), strEditable, strParentID,
-          strNodeId, TreeID, strElementId);
-    } else if (TreeType.equals("MC")) {
-      data = WindowTreeData.selectCampaign(conn, strEditable, strParentID, strNodeId, TreeID);
-    } else if (TreeType.equals("PJ")) {
-      data = WindowTreeData.selectProject(conn, strEditable, strParentID, strNodeId, TreeID);
-    } else if (TreeType.equals("AY")) {
-      data = WindowTreeData.selectActivity(conn, strEditable, strParentID, strNodeId, TreeID);
-    } else if (TreeType.equals("SR")) {
-      data = WindowTreeData.selectSalesRegion(conn, strEditable, strParentID, strNodeId, TreeID);
-    } else if (TreeType.equals("AR")) {
-      data = WindowTreeData.selectAccountingReport(conn, strEditable, strParentID, strNodeId,
-          TreeID);
-    } else if (TreeType.equals("TR")) {
-      data = WindowTreeData.selectTaxReport(conn, strEditable, strParentID, strNodeId, TreeID);
-    } else if (TreeType.equals("AS")) {
-      data = WindowTreeData.selectAsset(conn, strEditable, strParentID, strNodeId, TreeID);
-    } else if (TreeType.equals("OBRE_RC")) {
-      data = WindowTreeData.selectOBRE_ResouceCategory(conn, "OBRE_Resource_Category_ID",
-          "OBRE_Resource_Category", TreeID, strEditable, strParentID, strNodeId);
-    } else if (TreeType.equals("CH")) {
-      String strCharacteristicId = vars
-          .getSessionValue(Utility.getWindowID(conn, strTabID) + "|M_Characteristic_ID");
-      data = WindowTreeData.selectChValue(conn, strEditable, strParentID, strNodeId, TreeID,
-          strCharacteristicId);
-    }
-
-    return data;
-  }
-
-  /**
-   * Auxiliar method to transform a FieldProvider into a WindowTreeData object.
-   * 
-   * @param data
-   *          FieldProvider to transform.
-   * @return WindowTreeData object.
-   * @throws ServletException
-   */
-  public static WindowTreeData transformFieldProvider(FieldProvider data) throws ServletException {
-    WindowTreeData aux = new WindowTreeData();
-    aux.nodeId = data.getField("nodeId");
-    aux.parentId = data.getField("parentId");
-    aux.seqno = data.getField("seqno");
-    aux.id = data.getField("id");
-    aux.name = data.getField("name");
-    aux.description = data.getField("description");
-    aux.issummary = data.getField("issummary");
-    aux.action = data.getField("action");
-    aux.adWindowId = data.getField("adWindowId");
-    aux.adProcessId = data.getField("adProcessId");
-    aux.adFormId = data.getField("adFormId");
-    return aux;
-  }
-
-  /**
-   * Adds an html node structure. Used by the WindowTree java to build the html tree.
-   * 
-   * @param name
-   *          Text to display.
-   * @param description
-   *          Description.
-   * @param target
-   *          Target to open link (deprecated).
-   * @param isSummary
-   *          If is a folder.
-   * @param windowType
-   *          Type of window.
-   * @param strDirection
-   *          Base path for the urls.
-   * @param strOnClick
-   *          Command for the onclick event.
-   * @param strOnDblClick
-   *          Command for the onDblClick event.
-   * @param hasChilds
-   *          Boolean to know if has any child.
-   * @param nodeId
-   *          Id of the node.
-   * @param action
-   *          Type of element.
-   * @return String html with the node.
-   */
-  public static String addNodeElement(String name, String description, String target,
-      boolean isSummary, String windowType, String strDirection, String strOnClick,
-      String strOnDblClick, boolean hasChilds, String nodeId, String action) {
-    String localStrOnDblClick = strOnDblClick;
-    String localStrOnClick = strOnClick;
-    if (log4j.isDebugEnabled()) {
-      log4j.debug("WindowTreeUtility.addNodeElement() - name: " + name);
-    }
-    StringBuffer element = new StringBuffer();
-    localStrOnClick = Replace.replace(localStrOnClick, "\"", "&quot;");
-    localStrOnDblClick = Replace.replace(localStrOnDblClick, "\"", "&quot;");
-
-    // In case the element is filtered (localStrOnClick and localStrOnDblClick is null), it is shown
-    // in the
-    // tree but click action is disabled
-    if (isSummary) {
-      element.append("<li id=\"folder")
-          .append((hasChilds ? "" : "NoChilds"))
-          .append("__")
-          .append(nodeId)
-          .append("\"")
-          .append((nodeId.equals("0")
-              ? " noDrag=\"true\" noSiblings=\"true\" noDelete=\"true\" noRename=\"true\" "
-              : ""))
-          .append(">\n");
-      if (localStrOnClick == null && localStrOnDblClick == null) {
-        element.append("<a id=\"folderHref")
-            .append((hasChilds ? "" : "NoChilds"))
-            .append("__")
-            .append(nodeId)
-            .append("\"");
-      } else {
-        element.append("<a href=\"#\" id=\"folderHref")
-            .append((hasChilds ? "" : "NoChilds"))
-            .append("__")
-            .append(nodeId)
-            .append("\"");
-        if (localStrOnDblClick != null && !localStrOnDblClick.equals("")) {
-          element.append(" onclick=\"").append(localStrOnDblClick).append("return true;\"");
-        }
-      }
-      element.append(">").append(StringEscapeUtils.escapeHtml(name)).append("</a>\n");
-      // element.append("</li>\n");
-    } else {
-      element.append("<li id=\"")
-          .append(windowTypeNico(action))
-          .append("__")
-          .append(nodeId)
-          .append("\" isElement=\"true\"")
-          .append(" noChildren=\"true\"")
-          .append(">\n");
-      if (localStrOnClick == null && localStrOnDblClick == null) {
-        element.append("<a id=\"child")
-            .append(windowTypeNico(action))
-            .append("__")
-            .append(nodeId)
-            .append("\"");
-      } else {
-        element.append("<a href=\"#\" id=\"child")
-            .append(windowTypeNico(action))
-            .append("__")
-            .append(nodeId)
-            .append("\"");
-        if (localStrOnDblClick != null && !localStrOnDblClick.equals("")) {
-          element.append(" onclick=\"").append(localStrOnDblClick).append("return true;\"");
-        }
-      }
-
-      element.append(">").append(StringEscapeUtils.escapeHtml(name)).append("</a>\n");
-      element.append("</li>\n");
-    }
-    return element.toString();
-  }
-
-  /**
-   * Type for the class of the html element.
-   * 
-   * @param type
-   *          Database type.
-   * @return String with the css type.
-   */
-  public static String windowType(String type) {
-    if (log4j.isDebugEnabled()) {
-      log4j.debug("WindowTreeUtility.windowType() - type: " + type);
-    }
-    if (type == null || type.equals("")) {
-      return "";
-    } else if (type.equals("W")) {
-      return "Ventanas";
-    } else if (type.equals("X")) {
-      return "Formularios";
-    } else if (type.equals("P")) {
-      return "Procesos";
-    } else if (type.equals("T")) {
-      return "Tareas";
-    } else if (type.equals("R")) {
-      return "Informes";
-    } else if (type.equals("F")) {
-      return "FlujoTrabajo";
-    } else if (type.equals("B")) {
-      return "BancoTrabajo";
-    } else {
-      return "";
-    }
-  }
-
-  /**
-   * Type for the id of the html element. Used in the test application.
-   * 
-   * @param tipo
-   *          Database type.
-   * @return String with the id type.
-   */
-  public static String windowTypeNico(String tipo) {
-    if (log4j.isDebugEnabled()) {
-      log4j.debug("WindowTreeUtility.windowTypeNico() - type: " + tipo);
-    }
-    if (tipo == null) {
-      return "";
-    } else if (tipo.equals("W")) {
-      return "window";
-    } else if (tipo.equals("X")) {
-      return "form";
-    } else if (tipo.equals("P")) {
-      return "process";
-    } else if (tipo.equals("R")) {
-      return "report";
-    } else if (tipo.equals("F")) {
-      return "wf";
-    } else if (tipo.equals("B")) {
-      return "wb";
-    } else {
-      return "";
-    }
-  }
-
-  /**
-   * Sets the node in the specified position.
-   * 
-   * @param conn
-   *          Handler for the database connection.
-   * @param vars
-   *          Handler for the session info.
-   * @param TreeType
-   *          Type of tree.
-   * @param TreeID
-   *          Id of the tree.
-   * @param strParentID
-   *          Parent node id.
-   * @param strLink
-   *          Actual node id.
-   * @param strSeqNo
-   *          Sequence number.
-   * @throws ServletException
-   */
-  public static void setNode(ConnectionProvider conn, VariablesSecureApp vars, String TreeType,
-      String TreeID, String strParentID, String strLink, String strSeqNo) throws ServletException {
-    if (log4j.isDebugEnabled()) {
-      log4j.debug("WindowTreeUtility.setNode() - TreeID: " + TreeID);
-    }
-
-    WindowTreeData.update(conn, vars.getUser(), strParentID, strSeqNo, TreeID, strLink);
-  }
-
-}
--- a/src/org/openbravo/erpCommon/utility/WindowTree_data.xsql	Tue May 19 15:31:03 2020 +0200
+++ b/src/org/openbravo/erpCommon/utility/WindowTree_data.xsql	Fri May 08 12:49:45 2020 +0200
@@ -12,311 +12,13 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2012 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2020 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
 -->
 
-
-
-
-
 <SqlClass name="WindowTreeData" package="org.openbravo.erpCommon.utility" accessModifier="public">
-   <SqlClassComment></SqlClassComment>
-   <SqlMethod name="select" type="preparedStatement" return="multiple">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        SELECT tn.Node_ID,tn.Parent_ID,tn.SeqNo, m.AD_Menu_ID AS ID, m.Name,m.Description,m.IsSummary,
-        m.Action, m.AD_Window_ID, m.AD_Process_ID, m.AD_Form_ID,
-        (case when (select count(*) from ad_module where type='T' and isindevelopment='Y')=0 
-               then Mo.ISINDEVELOPMENT 
-               else 'Y' end) as isInDevelopment, 
-        '' as IsReady, '' as AD_OrgType_ID
-        FROM AD_TreeNode tn,          
-             AD_Menu m,
-             AD_Module Mo
-        WHERE tn.Node_ID = m.AD_Menu_ID 
-        AND tn.AD_Tree_ID = ? 
-        AND Mo.AD_Module_ID = m.AD_Module_ID
-        ORDER BY COALESCE(tn.Parent_ID, '-1'), tn.SeqNo
-      </Sql>
-        <Parameter name="editable" optional="true" type="none" after="WHERE " text="tn.IsActive='Y' AND m.isActive='Y' AND "/>
-        <Parameter name="parentId" optional="true" after="WHERE " text="tn.Parent_ID = ? AND "/>
-        <Parameter name="nodeId" optional="true" after="WHERE " text="tn.Node_ID = ? AND "/>
-        <Parameter name="adTreeId"/>
-   </SqlMethod>
-   <SqlMethod name="selectTrl" type="preparedStatement" return="multiple">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        SELECT tn.Node_ID,tn.Parent_ID,tn.SeqNo, m.AD_Menu_ID AS ID, 
-               COALESCE (t.Name, m.Name) as name,t.Description,m.IsSummary,
-        m.Action, m.AD_Window_ID, m.AD_Process_ID, m.AD_Form_ID,
-        (case when (select count(*) from ad_module where type='T' and isindevelopment='Y')=0 
-               then Mo.ISINDEVELOPMENT 
-               else 'Y' end) as isInDevelopment
-        FROM AD_TreeNode tn, 
-             AD_Menu m left join AD_Menu_Trl t on m.AD_Menu_ID = t.AD_Menu_ID 
-                                               AND t.AD_Language = ?
-                                               AND m.AD_Menu_ID = t.AD_Menu_ID,
-             AD_Module Mo
-        WHERE  tn.Node_ID = m.AD_Menu_ID 
-        AND tn.AD_Tree_ID = ? 
-        AND Mo.AD_Module_ID = m.AD_Module_ID
-        ORDER BY COALESCE(tn.Parent_ID, '-1'), tn.SeqNo
-      </Sql>
-        <Parameter name="adLanguage"/>
-        <Parameter name="editable" optional="true" type="none" after="WHERE " text="tn.IsActive='Y' AND m.isActive='Y' AND "/>
-        <Parameter name="parentId" optional="true" after="WHERE " text="tn.Parent_ID = ? AND "/>
-        <Parameter name="nodeId" optional="true" after="WHERE " text="tn.Node_ID = ? AND "/>
-        <Parameter name="adTreeId"/>
-   </SqlMethod>
-   <SqlMethod name="selectOrg" type="preparedStatement" return="multiple">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        SELECT tn.Node_ID,tn.Parent_ID,tn.SeqNo, m.AD_Org_ID AS ID, m.Name,m.Description,m.IsSummary,m.IsReady, m.AD_OrgType_ID
-        FROM AD_TreeNode tn,
-         AD_Org m
-        WHERE tn.Node_ID = m.AD_Org_ID 
-        AND tn.AD_Tree_ID = ? 
-        ORDER BY COALESCE(tn.Parent_ID, '-1'), tn.SeqNo
-      </Sql>
-        <Parameter name="editable" optional="true" type="none" after="WHERE " text="tn.IsActive='Y' AND m.isActive='Y' AND "/>
-        <Parameter name="parentId" optional="true" after="WHERE " text="tn.Parent_ID = ? AND "/>
-        <Parameter name="nodeId" optional="true" after="WHERE " text="tn.Node_ID = ? AND "/>
-        <Parameter name="adTreeId"/>
-   </SqlMethod>
-   <SqlMethod name="selectProductCategory" type="preparedStatement" return="multiple">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        SELECT tn.Node_ID,tn.Parent_ID,tn.SeqNo, m.M_Product_Category_ID AS ID, m.Name,m.Description, m.IsSummary 
-        FROM AD_TreeNode tn, 
-          M_Product_Category m
-        WHERE tn.Node_ID = m.M_Product_Category_ID 
-        AND tn.AD_Tree_ID = ? 
-        ORDER BY COALESCE(tn.Parent_ID, '-1'), tn.SeqNo
-      </Sql>
-        <Parameter name="editable" optional="true" type="none" after="WHERE " text="tn.IsActive='Y' AND m.isActive='Y' AND "/>
-        <Parameter name="parentId" optional="true" after="WHERE " text="tn.Parent_ID = ? AND "/>
-        <Parameter name="nodeId" optional="true" after="WHERE " text="tn.Node_ID = ? AND "/>
-        <Parameter name="adTreeId"/>
-   </SqlMethod>
-   <SqlMethod name="selectCostcenter" type="preparedStatement" return="multiple">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        SELECT tn.Node_ID,tn.Parent_ID,tn.SeqNo, c.C_Costcenter_ID AS ID, c.Name, c.Description, c.IsSummary 
-        FROM AD_TreeNode tn, 
-          C_Costcenter c
-        WHERE tn.Node_ID = c.C_Costcenter_ID 
-        AND tn.AD_Tree_ID = ? 
-        ORDER BY COALESCE(tn.Parent_ID, '-1'), tn.SeqNo
-      </Sql>
-        <Parameter name="editable" optional="true" type="none" after="WHERE " text="tn.IsActive='Y' AND c.isActive='Y' AND "/>
-        <Parameter name="parentId" optional="true" after="WHERE " text="tn.Parent_ID = ? AND "/>
-        <Parameter name="nodeId" optional="true" after="WHERE " text="tn.Node_ID = ? AND "/>
-        <Parameter name="adTreeId"/>
-   </SqlMethod>
-   <SqlMethod name="selectUser1" type="preparedStatement" return="multiple">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        SELECT tn.Node_ID,tn.Parent_ID,tn.SeqNo, u1.User1_ID AS ID, u1.Name, u1.Description, u1.IsSummary 
-        FROM AD_TreeNode tn, 
-          User1 u1
-        WHERE tn.Node_ID = u1.User1_ID 
-        AND tn.AD_Tree_ID = ? 
-        ORDER BY COALESCE(tn.Parent_ID, '-1'), tn.SeqNo
-      </Sql>
-        <Parameter name="editable" optional="true" type="none" after="WHERE " text="tn.IsActive='Y' AND u1.isActive='Y' AND "/>
-        <Parameter name="parentId" optional="true" after="WHERE " text="tn.Parent_ID = ? AND "/>
-        <Parameter name="nodeId" optional="true" after="WHERE " text="tn.Node_ID = ? AND "/>
-        <Parameter name="adTreeId"/>
-   </SqlMethod>
-   <SqlMethod name="selectUser2" type="preparedStatement" return="multiple">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        SELECT tn.Node_ID,tn.Parent_ID,tn.SeqNo, u2.User2_ID AS ID, u2.Name, u2.Description, u2.IsSummary 
-        FROM AD_TreeNode tn, 
-          User2 u2
-        WHERE tn.Node_ID = u2.User2_ID 
-        AND tn.AD_Tree_ID = ? 
-        ORDER BY COALESCE(tn.Parent_ID, '-1'), tn.SeqNo
-      </Sql>
-        <Parameter name="editable" optional="true" type="none" after="WHERE " text="tn.IsActive='Y' AND u2.isActive='Y' AND "/>
-        <Parameter name="parentId" optional="true" after="WHERE " text="tn.Parent_ID = ? AND "/>
-        <Parameter name="nodeId" optional="true" after="WHERE " text="tn.Node_ID = ? AND "/>
-        <Parameter name="adTreeId"/>
-   </SqlMethod>
-   <SqlMethod name="selectBOM" type="preparedStatement" return="multiple">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        SELECT tn.Node_ID,tn.Parent_ID,tn.SeqNo, m.M_Product_BOM_ID AS ID, p.Name,p.Description, p.IsBOM AS IsSummary 
-        FROM AD_TreeNode tn, 
-          M_Product_BOM m, M_Product p
-        WHERE tn.Node_ID = m.M_Product_BOM_ID 
-        AND m.M_ProductBOM_ID = p.M_Product_ID 
-        AND tn.AD_Tree_ID = ? 
-        ORDER BY COALESCE(tn.Parent_ID, '-1'), tn.SeqNo
-      </Sql>
-        <Parameter name="editable" optional="true" type="none" after="WHERE " text="tn.IsActive='Y' AND m.isActive='Y' AND "/>
-        <Parameter name="parentId" optional="true" after="WHERE " text="tn.Parent_ID = ? AND "/>
-        <Parameter name="nodeId" optional="true" after="WHERE " text="tn.Node_ID = ? AND "/>
-        <Parameter name="adTreeId"/>
-   </SqlMethod>
-   <SqlMethod name="selectElementValue" type="preparedStatement" return="multiple">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        SELECT tn.Node_ID,tn.Parent_ID,tn.SeqNo, m.C_ElementValue_ID AS ID, 
-                m.value||' - '||coalesce(mt.name, m.name) as Name,m.Description,m.IsSummary 
-        FROM C_ElementValue m left join c_elementvalue_trl mt on mt.c_elementvalue_id = m.c_elementvalue_id
-                                  and mt.ad_language = ?,
-             AD_TreeNode tn
-        WHERE tn.Node_ID = m.C_ElementValue_ID 
-        AND tn.AD_Tree_ID = ? 
-        AND m.C_Element_ID = ? 
-        ORDER BY COALESCE(tn.Parent_ID, '-1'), tn.SeqNo
-      </Sql>
-	  	<Parameter name="adLanguage"/>
-        <Parameter name="editable" optional="true" type="none" after="WHERE " text="tn.IsActive='Y' AND m.isActive='Y' AND "/>
-        <Parameter name="parentId" optional="true" after="WHERE " text="tn.Parent_ID = ? AND "/>
-        <Parameter name="nodeId" optional="true" after="WHERE " text="tn.Node_ID = ? AND "/>
-        <Parameter name="adTreeId"/>
-        <Parameter name="cElementId"/>
-   </SqlMethod>
-   <SqlMethod name="selectCampaign" type="preparedStatement" return="multiple">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        SELECT tn.Node_ID,tn.Parent_ID,tn.SeqNo, m.C_Campaign_ID AS ID, m.Name,m.Description, m.IsSummary 
-        FROM AD_TreeNode tn, 
-              C_Campaign m
-        WHERE  tn.Node_ID = m.C_Campaign_ID 
-        AND tn.AD_Tree_ID = ? 
-        ORDER BY COALESCE(tn.Parent_ID, '-1'), tn.SeqNo
-      </Sql>
-        <Parameter name="editable" optional="true" type="none" after="WHERE " text="tn.IsActive='Y' AND m.isActive='Y' AND "/>
-        <Parameter name="parentId" optional="true" after="WHERE " text="tn.Parent_ID = ? AND "/>
-        <Parameter name="nodeId" optional="true" after="WHERE " text="tn.Node_ID = ? AND "/>
-        <Parameter name="adTreeId"/>
-   </SqlMethod>
-   <SqlMethod name="selectProject" type="preparedStatement" return="multiple">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        SELECT tn.Node_ID,tn.Parent_ID,tn.SeqNo, m.C_Project_ID AS ID, m.Name,m.Description,m.IsSummary 
-        FROM AD_TreeNode tn, C_Project m
-        WHERE tn.Node_ID = m.C_Project_ID 
-        AND tn.AD_Tree_ID = ? 
-        ORDER BY COALESCE(tn.Parent_ID, '-1'), tn.SeqNo
-      </Sql>
-        <Parameter name="editable" optional="true" type="none" after="WHERE " text="tn.IsActive='Y' AND m.isActive='Y' AND "/>
-        <Parameter name="parentId" optional="true" after="WHERE " text="tn.Parent_ID = ? AND "/>
-        <Parameter name="nodeId" optional="true" after="WHERE " text="tn.Node_ID = ? AND "/>
-        <Parameter name="adTreeId"/>
-   </SqlMethod>
-   <SqlMethod name="selectActivity" type="preparedStatement" return="multiple">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        SELECT tn.Node_ID,tn.Parent_ID,tn.SeqNo, m.C_Activity_ID AS ID, m.Name,m.Description,m.IsSummary 
-        FROM AD_TreeNode tn, C_Activity m
-        WHERE  tn.Node_ID = m.C_Activity_ID 
-        AND tn.AD_Tree_ID = ? 
-        ORDER BY COALESCE(tn.Parent_ID, '-1'), tn.SeqNo
-      </Sql>
-        <Parameter name="editable" optional="true" type="none" after="WHERE " text="tn.IsActive='Y' AND m.isActive='Y' AND "/>
-        <Parameter name="parentId" optional="true" after="WHERE " text="tn.Parent_ID = ? AND "/>
-        <Parameter name="nodeId" optional="true" after="WHERE " text="tn.Node_ID = ? AND "/>
-        <Parameter name="adTreeId"/>
-   </SqlMethod>
-   <SqlMethod name="selectSalesRegion" type="preparedStatement" return="multiple">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        SELECT tn.Node_ID,tn.Parent_ID,tn.SeqNo, m.C_SalesRegion_ID AS ID, m.Name,m.Description,m.IsSummary 
-        FROM AD_TreeNode tn, C_SalesRegion m
-        WHERE tn.Node_ID = m.C_SalesRegion_ID 
-        AND tn.AD_Tree_ID = ? 
-        ORDER BY COALESCE(tn.Parent_ID, '-1'), tn.SeqNo
-      </Sql>
-        <Parameter name="editable" optional="true" type="none" after="WHERE " text="tn.IsActive='Y' AND m.isActive='Y' AND "/>
-        <Parameter name="parentId" optional="true" after="WHERE " text="tn.Parent_ID = ? AND "/>
-        <Parameter name="nodeId" optional="true" after="WHERE " text="tn.Node_ID = ? AND "/>
-        <Parameter name="adTreeId"/>
-   </SqlMethod>
-   <SqlMethod name="selectAccountingReport" type="preparedStatement" return="multiple">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        SELECT tn.Node_ID,tn.Parent_ID,tn.SeqNo, ar.AD_AccountingRpt_Element_ID AS ID, ar.Name,ar.Description,ar.IsSummary 
-        FROM AD_TreeNode tn, AD_AccountingRpt_Element ar
-        WHERE tn.Node_ID = ar.AD_AccountingRpt_Element_ID 
-        AND tn.AD_Tree_ID = ? 
-        ORDER BY COALESCE(tn.Parent_ID, '-1'), tn.SeqNo
-      </Sql>
-        <Parameter name="editable" optional="true" type="none" after="WHERE " text="tn.IsActive='Y' AND ar.isActive='Y' AND "/>
-        <Parameter name="parentId" optional="true" after="WHERE " text="tn.Parent_ID = ? AND "/>
-        <Parameter name="nodeId" optional="true" after="WHERE " text="tn.Node_ID = ? AND "/>
-        <Parameter name="adTreeId"/>
-   </SqlMethod>
-   <SqlMethod name="selectTaxReport" type="preparedStatement" return="multiple">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        SELECT tn.Node_ID,tn.Parent_ID,tn.SeqNo, tr.C_TAX_REPORT_ID AS ID, tr.NAME,tr.Description,tr.IsSummary 
-        FROM AD_TREENODE tn, C_TAX_REPORT tr
-        WHERE tn.Node_ID = tr.C_TAX_REPORT_ID
-        AND tn.AD_Tree_ID = ? 
-        ORDER BY COALESCE(tn.Parent_ID, '-1'), tn.SeqNo
-      </Sql>
-        <Parameter name="editable" optional="true" type="none" after="WHERE " text="tn.IsActive='Y' AND tr.isActive='Y' AND "/>
-        <Parameter name="parentId" optional="true" after="WHERE " text="tn.Parent_ID = ? AND "/>
-        <Parameter name="nodeId" optional="true" after="WHERE " text="tn.Node_ID = ? AND "/>
-        <Parameter name="adTreeId"/>
-   </SqlMethod>
-   <SqlMethod name="selectAsset" type="preparedStatement" return="multiple">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        SELECT tn.Node_ID,tn.Parent_ID,tn.SeqNo, a.A_Asset_ID AS ID, a.Name,a.Description,a.IsSummary 
-        FROM AD_TreeNode tn, A_Asset a
-        WHERE tn.Node_ID = a.A_Asset_ID 
-        AND tn.AD_Tree_ID = ? 
-        ORDER BY COALESCE(tn.Parent_ID, '-1'), tn.SeqNo
-      </Sql>
-        <Parameter name="editable" optional="true" type="none" after="WHERE " text="tn.IsActive='Y' AND a.isActive='Y' AND "/>
-        <Parameter name="parentId" optional="true" after="WHERE " text="tn.Parent_ID = ? AND "/>
-        <Parameter name="nodeId" optional="true" after="WHERE " text="tn.Node_ID = ? AND "/>
-        <Parameter name="adTreeId"/>
-   </SqlMethod>
-   <SqlMethod name="selectOBRE_ResouceCategory" type="preparedStatement" return="multiple">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        SELECT tn.Node_ID,tn.Parent_ID,tn.SeqNo, a.A_Asset_ID AS ID, 
-        a.Name,a.Description,a.IsSummary 
-        FROM AD_TreeNode tn, A_Asset a
-        WHERE 1=1 
-        AND tn.Node_ID = a.A_Asset_ID 
-        AND tn.AD_Tree_ID = ? 
-        AND 2=2 
-        ORDER BY COALESCE(tn.Parent_ID, '-1'), tn.SeqNo
-      </Sql>
-        <Parameter name="columnname" optional="false" type="replace" after="tn.SeqNo, a." text="A_Asset_ID"/>
-        <Parameter name="tablename" optional="false" type="replace" after="AD_TreeNode tn, " text="A_Asset"/>
-        <Parameter name="columnname" optional="false" type="replace" after="AND tn.Node_ID = a." text="A_Asset_ID"/>
-        <Parameter name="adTreeId"/>
-        <Parameter name="editable" optional="true" type="none" after="AND 2=2 " text="AND tn.IsActive='Y' AND a.isActive='Y' "/>
-        <Parameter name="parentId" optional="true" after="AND 2=2 " text="AND tn.Parent_ID = ? "/>
-        <Parameter name="nodeId" optional="true" after="AND 2=2 " text="AND tn.Node_ID = ? "/>
-   </SqlMethod>
-   <SqlMethod name="selectChValue" type="preparedStatement" return="multiple">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        SELECT tn.Node_ID, tn.Parent_ID, tn.SeqNo, m.m_ch_value_id AS ID,
-            m.name AS Name, '' as description, m.IsSummary 
-        FROM m_ch_value m JOIN AD_TreeNode tn ON tn.Node_ID = m.m_ch_value_id
-        WHERE tn.AD_Tree_ID = ? 
-          AND m.m_characteristic_id = ? 
-        ORDER BY COALESCE(tn.Parent_ID, '-1'), tn.SeqNo
-      </Sql>
-        <Parameter name="editable" optional="true" type="none" after="WHERE " text="tn.IsActive='Y' AND m.isActive='Y' AND "/>
-        <Parameter name="parentId" optional="true" after="WHERE " text="tn.Parent_ID = ? AND "/>
-        <Parameter name="nodeId" optional="true" after="WHERE " text="tn.Node_ID = ? AND "/>
-        <Parameter name="adTreeId"/>
-        <Parameter name="mCharacteristicId"/>
-   </SqlMethod>
    <SqlMethod name="selectTreeID" type="preparedStatement" return="multiple">
       <SqlMethodComment></SqlMethodComment>
       <Sql>
@@ -367,108 +69,4 @@
         <Parameter name="adClientId" optional="true" type="replace" after="t2.AD_Client_ID IN (" text="'2'"/>
         <Parameter name="ad_table_id"/>
    </SqlMethod>   
-   <SqlMethod name="TreeName" type="preparedStatement" return="multiple">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        SELECT NAME, DESCRIPTION 
-        FROM AD_Tree 
-        WHERE AD_Tree_ID = ? 
-        AND AD_Org_ID IN ('1') 
-        AND TreeType = ? 
-        AND IsActive = 'Y'
-      </Sql>
-        <Parameter name="adTreeId"/>
-        <Parameter name="adClientId" optional="true" type="replace" after="AD_Org_ID IN (" text="'1'"/>
-        <Parameter name="treetype"/>
-   </SqlMethod>
-   <SqlMethod name="selectKey" type="preparedStatement" return="String" default="">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        SELECT C.COLUMNNAME
-        FROM AD_TAB T, AD_COLUMN C 
-        WHERE T.AD_TABLE_ID = C.AD_TABLE_ID
-        AND (C.ISKEY = 'Y'
-        OR C.ISSECONDARYKEY='Y')
-        AND T.AD_TAB_ID = ? 
-        AND C.ISACTIVE='Y'
-        ORDER BY C.SEQNO
-      </Sql>
-        <Parameter name="adTabId"/>
-   </SqlMethod>
-   <SqlMethod name="selectTableName" type="preparedStatement" return="String" default="">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        SELECT TB.TABLENAME
-        FROM AD_TAB T, AD_TABLE TB 
-        WHERE T.AD_TABLE_ID = TB.AD_TABLE_ID
-        AND T.AD_TAB_ID = ? 
-      </Sql>
-        <Parameter name="adTabId"/>
-   </SqlMethod>
-   <SqlMethod name="selectEditable" type="preparedStatement" return="String" default="N">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        SELECT ISREADONLY
-        FROM AD_TAB 
-        WHERE AD_TAB_ID = ? 
-      </Sql>
-        <Parameter name="adTabId"/>
-   </SqlMethod>
-   <SqlMethod name="selectTabName" type="preparedStatement" return="multiple">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        SELECT w.Name as Description, t.Name as NAME
-        FROM AD_Window w, AD_TAB t
-        WHERE w.AD_Window_ID = t.AD_Window_ID 
-        AND t.AD_TAB_ID = ? 
-        AND t.isActive = 'Y'
-      </Sql>
-        <Parameter name="adTabId"/>
-   </SqlMethod>
-   <SqlMethod name="selectParents" type="preparedStatement" return="multiple">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        SELECT COLUMNNAME AS Name, ad_window_id AS node_Id
-        FROM AD_COLUMN c, AD_FIELD f, AD_TAB t 
-        WHERE t.ad_tab_id = f.ad_tab_id 
-        AND f.ad_column_id = c.ad_column_id 
-        AND t.ad_tab_id = ?
-        AND c.isparent='Y' 
-        ORDER BY f.SeqNo
-      </Sql>
-        <Parameter name="adTabId"/>
-   </SqlMethod>
-   <SqlMethod name="selectIsReady" type="preparedStatement" return="String" default="N">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        SELECT ISREADY
-        FROM AD_ORG
-        WHERE AD_ORG_ID = ?
-      </Sql>
-        <Parameter name="adOrgId"/>
-   </SqlMethod>
-   <SqlMethod name="selectIsStatic" type="preparedStatement" return="String" default="N">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        SELECT A.ISSTATIC
-        FROM A_ASSET A
-        WHERE A.A_ASSET_ID = ?
-      </Sql>
-      <Parameter name="tablename" optional="false" type="replace" after="FROM " text="A_ASSET"/>
-      <Parameter name="tablename" optional="false" type="replace" after="WHERE A." text="A_ASSET"/>
-      <Parameter name="recordId"/>
-   </SqlMethod>
-   <SqlMethod name="update" type="preparedStatement" return="rowCount">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql>
-        UPDATE AD_TREENODE SET UPDATED=now(), UPDATEDBY = ?, PARENT_id = ?, SEQNO=TO_NUMBER(?) 
-        WHERE AD_TREE_ID = ? 
-        AND NODE_ID = ?
-      </Sql>
-        <Parameter name="updatedby"/>
-        <Parameter name="parentId"/>
-        <Parameter name="seqno"/>
-        <Parameter name="adTreeId"/>
-        <Parameter name="nodeId"/>
-   </SqlMethod>
 </SqlClass>