fixed bug 0006587: not all accesses are inserted when database is created
authorAsier Lostalé <asier.lostale@openbravo.com>
Tue, 16 Dec 2008 15:42:55 +0000
changeset 2348 e0d45b8ed7b2
parent 2347 f428a9e28b7f
child 2349 46f401255593
fixed bug 0006587: not all accesses are inserted when database is created
build.xml
src-db/database/model/functions/AD_UPDATE_ACCESS.xml
src/build.xml
--- a/build.xml	Tue Dec 16 15:02:38 2008 +0000
+++ b/build.xml	Tue Dec 16 15:42:55 2008 +0000
@@ -272,7 +272,7 @@
 		<ant dir="${base.src}" target="generate.entities" inheritAll="true" inheritRefs="true" />
 	</target>
 
-	<target name="export.sample.data">
+	<target name="export.sample.data" depends="code.rev">
 		<ant dir="${base.src}" target="export.sample.data" inheritAll="true" inheritRefs="true" />
 	</target>
 
--- a/src-db/database/model/functions/AD_UPDATE_ACCESS.xml	Tue Dec 16 15:02:38 2008 +0000
+++ b/src-db/database/model/functions/AD_UPDATE_ACCESS.xml	Tue Dec 16 15:42:55 2008 +0000
@@ -92,8 +92,7 @@
     'Y', now(), '0',
     now(), '0'
   FROM AD_ROLE, AD_ORG
-  WHERE AD_ROLE.AD_ROLE_ID = '0'
-    AND AD_ROLE.AD_CLIENT_ID = AD_ORG.AD_CLIENT_ID
+  WHERE AD_ROLE.ISMANUAL = 'N'
     AND AD_ORG.AD_ORG_ID ='0'
     AND NOT EXISTS (SELECT 1 FROM AD_ROLE_ORGACCESS
                     WHERE AD_ROLE_ID = AD_ROLE.AD_ROLE_ID
--- a/src/build.xml	Tue Dec 16 15:02:38 2008 +0000
+++ b/src/build.xml	Tue Dec 16 15:42:55 2008 +0000
@@ -161,7 +161,8 @@
 			<classpath refid="project.class.path" />
 		</taskdef>
 		<echo message="Importing sample reference data" />
-		<importsampledata userId="0" propertiesFile="${base.config}/Openbravo.properties" />
+    <importsampledata userId="0" propertiesFile="${base.config}/Openbravo.properties" />
+    <ant dir="${base.db}" target="database.postupdate.${bbdd.rdbms}" inheritAll="true" inheritRefs="true"/>
 	</target>
 
 	<target name="generate.entities" depends="compile.src.gen,clean.src.gen">