details:   /erp/devel/int/rev/907297079fbe
changeset: 6926:907297079fbe
user:      Iván Perdomo <ivan.perdomo <at> openbravo.com>
date:      Tue Apr 06 13:26:11 2010 +0200
summary:   Fixes issue 12881: Added deep linking support for manual windows

details:   /erp/devel/int/rev/e39ee10c09c0
changeset: 6927:e39ee10c09c0
user:      Priya Muthukumar <priya.muthukumar <at> openbravo.com>
date:      Tue Apr 06 14:01:49 2010 +0200
summary:   Fixed issue 12880 Create a ant task to call the webservices test

details:   /erp/devel/int/rev/ba70331d074a
changeset: 6928:ba70331d074a
user:      Harikrishnan Raja <harikrishnan.raja <at> openbravo.com>
date:      Tue Apr 06 17:52:36 2010 +0530
summary:   Fixes issue 12318: A sales order with negative amount, does not 
appear in \"Create invoices from orders\".

details:   /erp/devel/int/rev/34b8ebfe4d69
changeset: 6929:34b8ebfe4d69
user:      Asier Lostalé <asier.lostale <at> openbravo.com>
date:      Tue Apr 06 15:26:33 2010 +0200
summary:   fixed bug 12778: Wrong record identifier on new records

Default values for new records are calculated now using the standard column 
identifier

details:   /erp/devel/int/rev/bd47ae1e2e06
changeset: 6930:bd47ae1e2e06
user:      Antonio Moreno <antonio.moreno <at> openbravo.com>
date:      Tue Apr 06 15:22:46 2010 +0200
summary:   [validation] Improved some variable names in build.xml files

details:   /erp/devel/int/rev/fe57e4f2aa44
changeset: 6931:fe57e4f2aa44
user:      Antonio Moreno <antonio.moreno <at> openbravo.com>
date:      Tue Apr 06 15:32:31 2010 +0200
summary:   [validation] Swapped the generic message and the specific error 
messages of the validations

details:   /erp/devel/int/rev/b12253476074
changeset: 6932:b12253476074
user:      David Alsasua <david.alsasua <at> openbravo.com>
date:      Tue Apr 06 17:02:24 2010 +0200
summary:   Fixes issue 12834: Callout for amount calculation
does not work if we change the organization

details:   /erp/devel/int/rev/a31f8e677521
changeset: 6933:a31f8e677521
user:      Asier Lostalé <asier.lostale <at> openbravo.com>
date:      Tue Apr 06 17:35:29 2010 +0200
summary:   fixed bug 12832: Precision error

Format is now taken into accout for hidden fields

details:   /erp/devel/int/rev/ff4d43f119c3
changeset: 6934:ff4d43f119c3
user:      Antonio Moreno <antonio.moreno <at> openbravo.com>
date:      Tue Apr 06 19:01:43 2010 +0200
summary:   [validation] Added utility method handleError().

details:   /erp/devel/int/rev/b7e4da5128fe
changeset: 6935:b7e4da5128fe
user:      Antonio Moreno <antonio.moreno <at> openbravo.com>
date:      Tue Apr 06 19:21:10 2010 +0200
summary:   [validation] Add missing license to newly added files.

details:   /erp/devel/int/rev/8af91206af1a
changeset: 6936:8af91206af1a
user:      Iván Perdomo <ivan.perdomo <at> openbravo.com>
date:      Tue Apr 06 19:30:53 2010 +0200
summary:   Fixes issue 12886: Prevents NPE on invalid tabId

diffstat:

 build.xml                                                                |    
4 +
 src-core/src/org/openbravo/buildvalidation/BuildValidation.java          |   
20 +
 src-core/src/org/openbravo/buildvalidation/BuildValidationHandler.java   |   
25 +-
 src-core/src/org/openbravo/modulescript/ModuleScript.java                |   
20 +
 src-core/src/org/openbravo/modulescript/ModuleScriptHandler.java         |   
11 +
 src-db/database/model/views/C_INVOICE_CANDIDATE_V.xml                    |    
2 +-
 src-test/org/openbravo/test/AllWebserviceTests.java                      |   
49 ++
 src-util/buildvalidation/build.xml                                       |   
40 +-
 src-util/modulescript/build.xml                                          |   
38 +-
 src-wad/src/org/openbravo/wad/Fields_data.xsql                           |    
6 +-
 src-wad/src/org/openbravo/wad/Wad.java                                   |   
44 +-
 src-wad/src/org/openbravo/wad/WadUtility.java                            |    
2 +-
 src-wad/src/org/openbravo/wad/controls/WADButton.java                    |   
10 +-
 src-wad/src/org/openbravo/wad/controls/WADControl.java                   |   
46 +-
 src-wad/src/org/openbravo/wad/controls/WADHidden.java                    |   
75 ---
 src-wad/src/org/openbravo/wad/controls/WADHiddenNumber.html              |   
23 +
 src-wad/src/org/openbravo/wad/controls/WADHiddenNumber.xml               |   
27 +
 src-wad/src/org/openbravo/wad/controls/WADHiddenXML.html                 |    
5 +-
 src-wad/src/org/openbravo/wad/controls/WADImage.java                     |    
6 +-
 src-wad/src/org/openbravo/wad/controls/WADInteger.java                   |   
11 +
 src-wad/src/org/openbravo/wad/controls/WADNumber.java                    |   
38 +-
 src-wad/src/org/openbravo/wad/controls/WADSearch.java                    |  
201 +++++----
 src-wad/src/org/openbravo/wad/datasource.xml                             |    
2 +-
 src-wad/src/org/openbravo/wad/datasource.xsqlxml                         |    
2 +-
 src/build.xml                                                            |    
8 +
 src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Invoice_data.xsql |    
2 +-
 src/org/openbravo/erpCommon/ad_callouts/SL_Invoice_Amt.java              |   
10 +-
 src/org/openbravo/erpCommon/security/Menu.java                           |   
27 +-
 28 files changed, 472 insertions(+), 282 deletions(-)

diffs (truncated from 1339 to 300 lines):

diff -r 0a2aa53b170f -r 8af91206af1a build.xml
--- a/build.xml Tue Apr 06 09:52:40 2010 +0200
+++ b/build.xml Tue Apr 06 19:30:53 2010 +0200
@@ -438,6 +438,10 @@
     <ant dir="${base.src}" target="run.all.tests" inheritAll="true" 
inheritRefs="true" />
   </target>
 
+  <target name="run.webservice.tests" depends="init">
+      <ant dir="${base.src}" target="run.webservice.tests" inheritAll="true" 
inheritRefs="true" />
+  </target>
+
   <target name="run.quick.tests" depends="init">
     <ant dir="${base.src}" target="run.quick.tests" inheritAll="true" 
inheritRefs="true" />
   </target>
diff -r 0a2aa53b170f -r 8af91206af1a 
src-core/src/org/openbravo/buildvalidation/BuildValidation.java
--- a/src-core/src/org/openbravo/buildvalidation/BuildValidation.java   Tue Apr 
06 09:52:40 2010 +0200
+++ b/src-core/src/org/openbravo/buildvalidation/BuildValidation.java   Tue Apr 
06 19:30:53 2010 +0200
@@ -1,6 +1,18 @@
+/*
+ 
************************************************************************************
+ * Copyright (C) 2010 Openbravo S.L.U.
+ * Licensed under the Apache Software License version 2.0
+ * You may obtain a copy of the License at 
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to  in writing,  software  
distributed
+ * under the License is distributed  on  an  "AS IS"  BASIS,  WITHOUT  
WARRANTIES  OR
+ * CONDITIONS OF ANY KIND, either  express  or  implied.  See  the  License  
for  the
+ * specific language governing permissions and limitations under the License.
+ 
************************************************************************************
+ */
 package org.openbravo.buildvalidation;
 
 import java.io.File;
+import java.util.ArrayList;
 import java.util.List;
 
 import org.openbravo.database.CPStandAlone;
@@ -52,4 +64,12 @@
     cp = new CPStandAlone(fProp.getAbsolutePath());
     return cp;
   }
+
+  protected List<String> handleError(Throwable t) {
+    ArrayList<String> errors = new ArrayList<String>();
+    errors.add("Error executing build-validation " + this.getClass().getName() 
+ ": "
+        + t.getMessage());
+    errors.add("The build validation couldn't be properly executed");
+    return errors;
+  }
 }
\ No newline at end of file
diff -r 0a2aa53b170f -r 8af91206af1a 
src-core/src/org/openbravo/buildvalidation/BuildValidationHandler.java
--- a/src-core/src/org/openbravo/buildvalidation/BuildValidationHandler.java    
Tue Apr 06 09:52:40 2010 +0200
+++ b/src-core/src/org/openbravo/buildvalidation/BuildValidationHandler.java    
Tue Apr 06 19:30:53 2010 +0200
@@ -1,3 +1,14 @@
+/*
+ 
************************************************************************************
+ * Copyright (C) 2010 Openbravo S.L.U.
+ * Licensed under the Apache Software License version 2.0
+ * You may obtain a copy of the License at 
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to  in writing,  software  
distributed
+ * under the License is distributed  on  an  "AS IS"  BASIS,  WITHOUT  
WARRANTIES  OR
+ * CONDITIONS OF ANY KIND, either  express  or  implied.  See  the  License  
for  the
+ * specific language governing permissions and limitations under the License.
+ 
************************************************************************************
+ */
 package org.openbravo.buildvalidation;
 
 import java.io.File;
@@ -19,7 +30,6 @@
     basedir = new File(args[0]);
     module = args[1];
     PropertyConfigurator.configure("log4j.lcf");
-    String errorMessage = "";
     List<String> classes = new ArrayList<String>();
     ArrayList<File> modFolders = new ArrayList<File>();
     if (module != null && !module.equals("%")) {
@@ -55,9 +65,6 @@
           Object instance = myClass.newInstance();
           log4j.info("Executing build validation: " + s);
           errors = callExecute(myClass, instance);
-          for (String error : errors) {
-            errorMessage += error + "\n";
-          }
         }
       } catch (Exception e) {
         log4j.info("Error executing build-validation: " + s, e);
@@ -65,14 +72,22 @@
         System.exit(1);
       }
       if (errors.size() > 0) {
-        log4j.error(errorMessage);
         log4j
             .error("The build validation failed. The system hasn't been 
modified. Fix the problems described in the validation messages (either by 
uninstalling the affected modules, or by fixing the problems the validation 
found), and then start the build again.");
+        printMessage(errors);
         System.exit(1);
       }
     }
   }
 
+  private static void printMessage(List<String> errors) {
+    String errorMessage = "";
+    for (String error : errors) {
+      errorMessage += error + "\n";
+    }
+    log4j.error(errorMessage);
+  }
+
   @SuppressWarnings("unchecked")
   private static ArrayList<String> callExecute(Class<?> myClass, Object 
instance)
       throws IllegalAccessException, InvocationTargetException, 
NoSuchMethodException {
diff -r 0a2aa53b170f -r 8af91206af1a 
src-core/src/org/openbravo/modulescript/ModuleScript.java
--- a/src-core/src/org/openbravo/modulescript/ModuleScript.java Tue Apr 06 
09:52:40 2010 +0200
+++ b/src-core/src/org/openbravo/modulescript/ModuleScript.java Tue Apr 06 
19:30:53 2010 +0200
@@ -1,5 +1,18 @@
+/*
+ 
************************************************************************************
+ * Copyright (C) 2010 Openbravo S.L.U.
+ * Licensed under the Apache Software License version 2.0
+ * You may obtain a copy of the License at 
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to  in writing,  software  
distributed
+ * under the License is distributed  on  an  "AS IS"  BASIS,  WITHOUT  
WARRANTIES  OR
+ * CONDITIONS OF ANY KIND, either  express  or  implied.  See  the  License  
for  the
+ * specific language governing permissions and limitations under the License.
+ 
************************************************************************************
+ */
 package org.openbravo.modulescript;
 
+import org.apache.log4j.Logger;
+import org.apache.tools.ant.BuildException;
 import org.openbravo.database.CPStandAlone;
 import org.openbravo.database.ConnectionProvider;
 
@@ -11,6 +24,7 @@
  */
 public abstract class ModuleScript {
 
+  private static final Logger log4j = Logger.getLogger(ModuleScript.class);
   private ConnectionProvider cp = null;
 
   /**
@@ -33,4 +47,10 @@
     }
     return cp;
   }
+
+  protected void handleError(Throwable t) {
+    log4j
+        .error("Error executing moduleScript " + this.getClass().getName() + 
": " + t.getMessage());
+    throw new BuildException("Execution of moduleScript " + 
this.getClass().getName() + "failed.");
+  }
 }
\ No newline at end of file
diff -r 0a2aa53b170f -r 8af91206af1a 
src-core/src/org/openbravo/modulescript/ModuleScriptHandler.java
--- a/src-core/src/org/openbravo/modulescript/ModuleScriptHandler.java  Tue Apr 
06 09:52:40 2010 +0200
+++ b/src-core/src/org/openbravo/modulescript/ModuleScriptHandler.java  Tue Apr 
06 19:30:53 2010 +0200
@@ -1,3 +1,14 @@
+/*
+ 
************************************************************************************
+ * Copyright (C) 2010 Openbravo S.L.U.
+ * Licensed under the Apache Software License version 2.0
+ * You may obtain a copy of the License at 
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to  in writing,  software  
distributed
+ * under the License is distributed  on  an  "AS IS"  BASIS,  WITHOUT  
WARRANTIES  OR
+ * CONDITIONS OF ANY KIND, either  express  or  implied.  See  the  License  
for  the
+ * specific language governing permissions and limitations under the License.
+ 
************************************************************************************
+ */
 package org.openbravo.modulescript;
 
 import java.io.File;
diff -r 0a2aa53b170f -r 8af91206af1a 
src-db/database/model/views/C_INVOICE_CANDIDATE_V.xml
--- a/src-db/database/model/views/C_INVOICE_CANDIDATE_V.xml     Tue Apr 06 
09:52:40 2010 +0200
+++ b/src-db/database/model/views/C_INVOICE_CANDIDATE_V.xml     Tue Apr 06 
19:30:53 2010 +0200
@@ -13,7 +13,7 @@
    FROM c_doctype
   WHERE c_doctype.docbasetype = 'SOO' AND (c_doctype.docsubtypeso NOT IN 
('ON', 'OB', 'WR')))) AND (o.invoicerule = 'I' OR o.invoicerule = 'O' OR 
o.invoicerule = 'N' OR o.invoicerule = 'D' OR o.invoicerule = 'S' AND 
(si.invoicefrequency IS NULL OR si.invoicefrequency = 'D' OR 
si.invoicefrequency = 'W' OR si.invoicefrequency = 'T' AND trunc(o.dateordered) 
<= (TRUNC(now(), 'MM') + si.invoicedaycutoff - 1) AND trunc(now()) >= 
(TRUNC(o.dateordered, 'MM') + si.invoiceday - 1) OR trunc(o.dateordered) <= 
(TRUNC(now(), 'MM') + si.invoicedaycutoff + 14) AND trunc(now()) >= 
(TRUNC(o.dateordered, 'MM') + si.invoiceday + 14) OR si.invoicefrequency = 'M' 
AND trunc(o.dateordered) <= (TRUNC(now(), 'MM') + si.invoicedaycutoff - 1) AND 
trunc(now()) >= (TRUNC(o.dateordered, 'MM') + si.invoiceday - 1)))
   GROUP BY o.ad_client_id, o.ad_org_id, o.c_bpartner_id, o.c_order_id, 
o.documentno, o.dateordered, o.c_doctype_id, o.totallines, o.grandtotal, 
l.c_tax_id, o.invoicerule, o.m_pricelist_id, c.c_currency_id
- HAVING sum((l.qtyordered - l.qtyinvoiced) * l.priceactual) > 0 OR 
sum((l.qtydelivered - l.qtyinvoiced) * l.priceactual) > 0) sq
+ HAVING sum((l.qtyordered - l.qtyinvoiced) * l.priceactual) <> 0 OR 
sum((l.qtydelivered - l.qtyinvoiced) * l.priceactual) <> 0) sq
    JOIN m_pricelist p ON sq.m_pricelist_id = p.m_pricelist_id
    JOIN c_currency c ON sq.c_currency_id = c.c_currency_id]]></view>
   </database>
diff -r 0a2aa53b170f -r 8af91206af1a 
src-test/org/openbravo/test/AllWebserviceTests.java
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/org/openbravo/test/AllWebserviceTests.java       Tue Apr 06 
19:30:53 2010 +0200
@@ -0,0 +1,49 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (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) 2010 Openbravo SLU 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+package org.openbravo.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.openbravo.test.webservice.BaseWSTest;
+import org.openbravo.test.webservice.PerformanceTest;
+import org.openbravo.test.webservice.WSReadTest;
+import org.openbravo.test.webservice.WSUpdateTest;
+
+/**
+ * This test suite should only contain test cases which are to run the 
weservices included in core.
+ * 
+ * 
+ */
+public class AllWebserviceTests {
+
+  public static Test suite() {
+    final TestSuite suite = new TestSuite("Test for org.openbravo.test.dal");
+    // $JUnit-BEGIN$
+
+    suite.addTestSuite(WSReadTest.class);
+    suite.addTestSuite(WSUpdateTest.class);
+    suite.addTestSuite(PerformanceTest.class);
+
+    // $JUnit-END$
+    return suite;
+  }
+
+}
diff -r 0a2aa53b170f -r 8af91206af1a src-util/buildvalidation/build.xml
--- a/src-util/buildvalidation/build.xml        Tue Apr 06 09:52:40 2010 +0200
+++ b/src-util/buildvalidation/build.xml        Tue Apr 06 19:30:53 2010 +0200
@@ -18,13 +18,13 @@
 ************************************************************************
 -->
 
-<project name="openbravo-pre-install" default="compile" basedir=".">
-  <property name="build.pre" value="build/classes" />
-  <property name="build.pre.sqlc" value="build/javasqlc" />
-  <property name="build.pre.src" value="src" />
+<project name="openbravo-buildvalidation" default="compile" basedir=".">
+  <property name="build.validation" value="build/classes" />
+  <property name="build.validation.sqlc" value="build/javasqlc" />
+  <property name="build.validation.src" value="src" />
   <property name="main.dir" value="${basedir}/../.." />
 
-  <path id="pre.class.path">
+  <path id="buildvalidation.class.path">
     <pathelement path="build/classes/" />
     <dirset dir="${base.modules}">
       <include name="*/build/classes/" />
@@ -42,48 +42,48 @@
   </condition>
 
   <target name="init">
-    <mkdir dir="${build.pre}" />
-    <mkdir dir="${build.pre.sqlc}" />
-    <mkdir dir="${build.pre.sqlc}/src" />
+    <mkdir dir="${build.validation}" />
+    <mkdir dir="${build.validation.sqlc}" />
+    <mkdir dir="${build.validation.sqlc}/src" />
     <mkdir dir="${base.modules}/${module}/build/" />
     <mkdir dir="${base.modules}/${module}/build/javasqlc" />
     <mkdir dir="${base.modules}/${module}/build/classes" />
   </target>
 
   <target name="clean">
-    <delete dir="${build.pre}" failonerror="false" includeemptydirs="true" />
-    <delete dir="${build.pre.sqlc}" failonerror="false" 
includeemptydirs="true" />
+    <delete dir="${build.validation}" failonerror="false" 
includeemptydirs="true" />
+    <delete dir="${build.validation.sqlc}" failonerror="false" 
includeemptydirs="true" />
   </target>
 
   <target name="sqlcCore" depends="init" if="checkCore">
     <java classname="org.openbravo.data.Sqlc" jvm="${env.JAVA_HOME}/bin/java" 
fork="yes" maxmemory="${build.maxmemory}">
-      <arg line="'${base.config}'/Openbravo.properties .xsql ./src/org 
'${build.pre.sqlc}'" />
-      <classpath refid="pre.class.path" />
+      <arg line="'${base.config}'/Openbravo.properties .xsql ./src/org 
'${build.validation.sqlc}'" />
+      <classpath refid="buildvalidation.class.path" />
     </java>
-    <javac srcdir="${build.pre.sqlc}/src" includes="**/*.java" 
destdir="${build.pre}" encoding="UTF-8" debug="true" 
debuglevel="lines,vars,source">
-      <classpath refid="pre.class.path" />
+    <javac srcdir="${build.validation.sqlc}/src" includes="**/*.java" 
destdir="${build.validation}" encoding="UTF-8" debug="true" 
debuglevel="lines,vars,source">
+      <classpath refid="buildvalidation.class.path" />
     </javac>
   </target>
 
   <target name="sqlcModules" depends="init" unless="checkCore">
     <java classname="org.openbravo.data.Sqlc" jvm="${env.JAVA_HOME}/bin/java" 
fork="yes" maxmemory="${build.maxmemory}">
       <arg line="'${base.config}'/Openbravo.properties .xsql '${base.modules}' 
'${base.modules}'/'${module}'/src-util/buildvalidation/src 
*/src-util/buildvalidation" />
-      <classpath refid="pre.class.path" />
+      <classpath refid="buildvalidation.class.path" />
     </java>
     <javac srcdir="${base.modules}/${module}/src-util/buildvalidation/src" 
includes="**/*.java" destdir="${base.modules}/${module}/build/classes" 
encoding="UTF-8" debug="true" debuglevel="lines,vars,source">

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to