[Tree Extension] PLs use ad_table_id instead of treetype to fetch trees
authorAugusto Mauch <augusto.mauch@openbravo.com>
Tue, 25 Feb 2014 18:12:30 +0100
changeset 22568 7205d9b08325
parent 22567 0bad5a351ad5
child 22569 84a3a1b03190
[Tree Extension] PLs use ad_table_id instead of treetype to fetch trees
src-db/database/model/functions/AD_GET_ORG_LE_BU.xml
src-db/database/model/functions/AD_ORGTYPE_ISLE_ISBU.xml
src-db/database/model/functions/AD_ORGTYPE_ISTRANS_ALLOWED.xml
src-db/database/model/functions/AD_ORG_CHK_CALENDAR.xml
src-db/database/model/functions/AD_ORG_CHK_READY.xml
src-db/database/model/functions/AD_ORG_CHK_SCHEMAS.xml
src-db/database/model/functions/AD_ORG_GETCALENDAROWNER.xml
src-db/database/model/functions/AD_ORG_GETPERIODCONTROLALLOW.xml
--- a/src-db/database/model/functions/AD_GET_ORG_LE_BU.xml	Tue Feb 25 16:21:31 2014 +0100
+++ b/src-db/database/model/functions/AD_GET_ORG_LE_BU.xml	Tue Feb 25 18:12:30 2014 +0100
@@ -19,7 +19,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) 2012 Openbravo SLU
+* All portions are Copyright (C) 2012-2014 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
@@ -47,7 +47,7 @@
       WHERE hh.node_id=v_org_header_id
         AND ad_org.isready='Y'
         AND EXISTS (SELECT 1 FROM ad_tree
-                    WHERE ad_tree.treetype='OO'
+                    WHERE ad_tree.ad_table_id='155'
                       AND hh.ad_tree_id=ad_tree.ad_tree_id
                       AND hh.ad_client_id=ad_tree.ad_client_id);
     END LOOP;
@@ -64,7 +64,7 @@
       WHERE hh.node_id=v_org_header_id
         AND ad_org.isready='Y'
         AND EXISTS (SELECT 1 FROM ad_tree
-                    WHERE ad_tree.treetype='OO'
+                    WHERE ad_tree.ad_table_id='155'
                       AND hh.ad_tree_id=ad_tree.ad_tree_id
                       AND hh.ad_client_id=ad_tree.ad_client_id);
     END LOOP;
@@ -81,7 +81,7 @@
       WHERE hh.node_id=v_org_header_id
         AND ad_org.isready='Y'
         AND EXISTS (SELECT 1 FROM ad_tree
-                    WHERE ad_tree.treetype='OO'
+                    WHERE ad_tree.ad_table_id='155'
                       AND hh.ad_tree_id=ad_tree.ad_tree_id
                       AND hh.ad_client_id=ad_tree.ad_client_id);
     END LOOP;
--- a/src-db/database/model/functions/AD_ORGTYPE_ISLE_ISBU.xml	Tue Feb 25 16:21:31 2014 +0100
+++ b/src-db/database/model/functions/AD_ORGTYPE_ISLE_ISBU.xml	Tue Feb 25 18:12:30 2014 +0100
@@ -13,7 +13,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) 2009 Openbravo SLU
+* All portions are Copyright (C) 2009-2014 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
@@ -40,7 +40,7 @@
                    WHERE pp.node_id = hh.parent_id
                    AND hh.ad_tree_id = pp.ad_tree_id
                    AND hh.parent_id=ad_org.ad_org_id 
-                   AND  EXISTS (SELECT 1 FROM ad_tree WHERE treetype='OO' AND hh.Ad_tree_id=ad_tree.ad_tree_id))
+                   AND  EXISTS (SELECT 1 FROM ad_tree WHERE ad_table_id='155' AND hh.Ad_tree_id=ad_tree.ad_tree_id))
   )
 
   LOOP
@@ -71,7 +71,7 @@
                   FROM ad_tree, ad_org
                   WHERE ad_tree.ad_client_id = ad_org.ad_client_id
                   AND ad_tree.ad_client_id=t.ad_client_id
-                  AND ad_tree.treetype='OO'
+                  AND ad_tree.ad_table_id='155'
                   AND t.ad_tree_id=ad_tree.ad_tree_id
                   );
                   
--- a/src-db/database/model/functions/AD_ORGTYPE_ISTRANS_ALLOWED.xml	Tue Feb 25 16:21:31 2014 +0100
+++ b/src-db/database/model/functions/AD_ORGTYPE_ISTRANS_ALLOWED.xml	Tue Feb 25 18:12:30 2014 +0100
@@ -13,7 +13,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) 2008 Openbravo SLU
+* All portions are Copyright (C) 2008-2014 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/      
@@ -63,7 +63,7 @@
                   FROM ad_tree, ad_org
                   WHERE ad_tree.ad_client_id = ad_org.ad_client_id
                   AND ad_tree.ad_client_id=t.ad_client_id
-                  AND ad_tree.treetype='OO'
+                  AND ad_tree.ad_table_id='155'
                   AND t.ad_tree_id=ad_tree.ad_tree_id
                   );
       
--- a/src-db/database/model/functions/AD_ORG_CHK_CALENDAR.xml	Tue Feb 25 16:21:31 2014 +0100
+++ b/src-db/database/model/functions/AD_ORG_CHK_CALENDAR.xml	Tue Feb 25 18:12:30 2014 +0100
@@ -13,7 +13,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) 2008-2009 Openbravo SLU
+* All portions are Copyright (C) 2008-2014 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/      
@@ -68,7 +68,7 @@
                   FROM ad_tree, ad_org
                   WHERE ad_tree.ad_client_id = ad_org.ad_client_id
                   AND ad_tree.ad_client_id=t.ad_client_id
-                  AND ad_tree.treetype='OO'
+                  AND ad_tree.ad_table_id='155'
                   AND t.ad_tree_id=ad_tree.ad_tree_id
                   AND IsReady='Y'
                   );
--- a/src-db/database/model/functions/AD_ORG_CHK_READY.xml	Tue Feb 25 16:21:31 2014 +0100
+++ b/src-db/database/model/functions/AD_ORG_CHK_READY.xml	Tue Feb 25 18:12:30 2014 +0100
@@ -16,7 +16,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) 2008 Openbravo SLU
+* All portions are Copyright (C) 2008-2014 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
@@ -41,7 +41,7 @@
                 FROM ad_tree, ad_org
                 WHERE ad_tree.ad_client_id = ad_org.ad_client_id
                 AND ad_tree.ad_client_id=t.ad_client_id
-                AND ad_tree.treetype='OO'
+                AND ad_tree.ad_table_id='155'
                 AND t.ad_tree_id=ad_tree.ad_tree_id
                 );
     
--- a/src-db/database/model/functions/AD_ORG_CHK_SCHEMAS.xml	Tue Feb 25 16:21:31 2014 +0100
+++ b/src-db/database/model/functions/AD_ORG_CHK_SCHEMAS.xml	Tue Feb 25 18:12:30 2014 +0100
@@ -13,7 +13,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) 2008-2009 Openbravo SLU
+* All portions are Copyright (C) 2008-2014 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/      
@@ -57,7 +57,7 @@
                   FROM ad_tree, ad_org
                   WHERE ad_tree.ad_client_id = ad_org.ad_client_id
                   AND ad_tree.ad_client_id=t.ad_client_id
-                  AND ad_tree.treetype='OO'
+                  AND ad_tree.ad_table_id='155'
                   AND t.ad_tree_id=ad_tree.ad_tree_id
                   AND AD_Org.IsReady='Y'
                   );
--- a/src-db/database/model/functions/AD_ORG_GETCALENDAROWNER.xml	Tue Feb 25 16:21:31 2014 +0100
+++ b/src-db/database/model/functions/AD_ORG_GETCALENDAROWNER.xml	Tue Feb 25 18:12:30 2014 +0100
@@ -16,7 +16,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) 2008 Openbravo SLU
+* All portions are Copyright (C) 2008-2014 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
@@ -49,7 +49,7 @@
                   FROM ad_tree, ad_org
                   WHERE ad_tree.ad_client_id = ad_org.ad_client_id
                   AND ad_tree.ad_client_id=t.ad_client_id
-                  AND ad_tree.treetype='OO'
+                  AND ad_tree.ad_table_id='155'
                   AND t.ad_tree_id=ad_tree.ad_tree_id
                   );
 
--- a/src-db/database/model/functions/AD_ORG_GETPERIODCONTROLALLOW.xml	Tue Feb 25 16:21:31 2014 +0100
+++ b/src-db/database/model/functions/AD_ORG_GETPERIODCONTROLALLOW.xml	Tue Feb 25 18:12:30 2014 +0100
@@ -16,7 +16,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) 2009 Openbravo SLU
+* All portions are Copyright (C) 2009-2014 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
@@ -49,7 +49,7 @@
                   FROM ad_tree, ad_org
                   WHERE ad_tree.ad_client_id = ad_org.ad_client_id
                   AND ad_tree.ad_client_id=t.ad_client_id
-                  AND ad_tree.treetype='OO'
+                  AND ad_tree.ad_table_id='155'
                   AND t.ad_tree_id=ad_tree.ad_tree_id
                   );