src-util/modulescript/src/org/openbravo/modulescript/UpdatePersistOrgInfo_data.xsql
changeset 33894 faca925fb578
parent 33887 793f3d0ba3f5
--- a/src-util/modulescript/src/org/openbravo/modulescript/UpdatePersistOrgInfo_data.xsql	Fri Apr 27 09:59:55 2018 +0200
+++ b/src-util/modulescript/src/org/openbravo/modulescript/UpdatePersistOrgInfo_data.xsql	Fri Apr 27 10:55:13 2018 +0200
@@ -31,7 +31,13 @@
     <Sql><![CDATA[
         SELECT AD_Org_ID
         FROM AD_Org
-        WHERE isready = 'Y'
+        WHERE IsReady = 'Y'
+        AND AD_Org_ID <> '0'
+        AND AD_PeriodControlAllowed_Org_ID IS NULL
+        AND AD_CalendarOwner_Org_ID IS NULL 
+        AND AD_InheritedCalendar_ID IS NULL 
+        AND AD_LegalEntity_Org_ID IS NULL
+        AND AD_BusinessUnit_Org_ID IS NULL
     ]]></Sql>
     <Field name="dummy" value="void"/>
   </SqlMethod>