details:   /erp/devel/main/rev/9d7ba60a5d71
changeset: 8914:9d7ba60a5d71
user:      Antonio Moreno <antonio.moreno <at> openbravo.com>
date:      Tue Nov 16 16:00:52 2010 +0100
summary:   Related to issue 15178. Fixed small issue with module version in 
ad_orgmodule. Added order in checksum concatenation.

details:   /erp/devel/main/rev/7962725ee825
changeset: 8915:7962725ee825
user:      Adrián Romero <adrianromero <at> openbravo.com>
date:      Tue Nov 16 18:58:38 2010 +0100
summary:   Fixes issue 0015064: Performance problem in role window when there 
are many warehouses defined
It has been modified the way of generating the JSON object to use the included 
JSON library

details:   /erp/devel/main/rev/b1b58a335fa9
changeset: 8916:b1b58a335fa9
user:      RM packaging bot <staff.rm <at> openbravo.com>
date:      Wed Nov 17 03:27:02 2010 +0000
summary:   CI: promote changesets from pi to main

diffstat:

 src-db/database/sourcedata/AD_MODULE.xml                            |   4 +-
 src/org/openbravo/erpCommon/ad_forms/Role.java                      |  24 
++++-----
 src/org/openbravo/erpCommon/ad_forms/UpdateReferenceData_data.xsql  |   4 +-
 src/org/openbravo/erpCommon/modules/ModuleReferenceDataOrgTree.java |   1 +
 4 files changed, 16 insertions(+), 17 deletions(-)

diffs (97 lines):

diff -r 3e4ba05c6ca0 -r b1b58a335fa9 src-db/database/sourcedata/AD_MODULE.xml
--- a/src-db/database/sourcedata/AD_MODULE.xml  Tue Nov 16 13:16:29 2010 +0100
+++ b/src-db/database/sourcedata/AD_MODULE.xml  Wed Nov 17 03:27:02 2010 +0000
@@ -6,7 +6,7 @@
 <!--0-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--0-->  <NAME><![CDATA[Core]]></NAME>
-<!--0-->  <VERSION><![CDATA[2.50.18840]]></VERSION>
+<!--0-->  <VERSION><![CDATA[2.50.18915]]></VERSION>
 <!--0-->  <DESCRIPTION><![CDATA[Core module is the base one]]></DESCRIPTION>
 <!--0-->  <HELP><![CDATA[Core module is the base one, all developments in core 
are included as part of the standard Openbravo ERP.]]></HELP>
 <!--0-->  <URL><![CDATA[www.openbravo.com]]></URL>
@@ -22,7 +22,7 @@
 <!--0-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--0-->  <HASREFERENCEDATA><![CDATA[Y]]></HASREFERENCEDATA>
 <!--0-->  <REFERENCEDATAINFO><![CDATA[Standard document types for orders, 
invoices, etc. and settings]]></REFERENCEDATAINFO>
-<!--0-->  <VERSION_LABEL><![CDATA[dev]]></VERSION_LABEL>
+<!--0-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--0-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--0--></AD_MODULE>
 
diff -r 3e4ba05c6ca0 -r b1b58a335fa9 
src/org/openbravo/erpCommon/ad_forms/Role.java
--- a/src/org/openbravo/erpCommon/ad_forms/Role.java    Tue Nov 16 13:16:29 
2010 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/Role.java    Wed Nov 17 03:27:02 
2010 +0000
@@ -28,6 +28,8 @@
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import org.codehaus.jettison.json.JSONArray;
+import org.codehaus.jettison.json.JSONObject;
 
 import org.openbravo.base.secureApp.HttpSecureAppServlet;
 import org.openbravo.base.secureApp.LoginUtils;
@@ -110,22 +112,18 @@
     response.setContentType("application/json; charset=UTF-8");
     PrintWriter out = response.getWriter();
     if (data == null) {
-      out.println("null");
+      out.println(JSONObject.NULL.toString());
     } else {
-      out.println("[");
+      JSONArray list = new JSONArray();
+
       for (int i = 0; i < data.length; i++) {
-        if (i > 0) {
-          out.println(",");
-        }
-        out.print("[\"");
-        out.print(data[i].padre);
-        out.print("\", \"");
-        out.print(data[i].id);
-        out.print("\", \"");
-        out.print(FormatUtilities.replaceJS(data[i].name));
-        out.print("\"]");
+        JSONArray item = new JSONArray();
+        item.put(data[i].padre);
+        item.put(data[i].id);
+        item.put(data[i].name);
+        list.put(item);
       }
-      out.println("]");
+      out.println(list.toString());
     }
     out.close();
   }
diff -r 3e4ba05c6ca0 -r b1b58a335fa9 
src/org/openbravo/erpCommon/ad_forms/UpdateReferenceData_data.xsql
--- a/src/org/openbravo/erpCommon/ad_forms/UpdateReferenceData_data.xsql        
Tue Nov 16 13:16:29 2010 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/UpdateReferenceData_data.xsql        
Wed Nov 17 03:27:02 2010 +0000
@@ -62,7 +62,7 @@
       WHERE AD_MODULE.AD_MODULE_ID = AD_DATASET.AD_MODULE_ID      
       AND AD_MODULE.AD_MODULE_ID IN ('1')
       AND (AD_DATASET.ACCESSLEVEL IN ('3','1') OR (? = '0' AND 
AD_DATASET.ACCESSLEVEL IN ('3','6')))
-      ORDER BY AD_MODULE.AD_MODULE_ID
+      ORDER BY AD_MODULE.AD_MODULE_ID, AD_DATASET.AD_DATASET_ID
       ]]>
     </Sql>
     <Parameter name="modules" optional="true" type="replace" 
after="AD_MODULE_ID IN " text="('1')"/>
@@ -84,7 +84,7 @@
   <SqlMethod name="updateOrgModule" type="preparedStatement" return="rowCount">
     <SqlMethodComment></SqlMethodComment>
     <Sql>
-      UPDATE AD_ORGMODULE SET CHECKSUM = ?, UPDATED=NOW(), UPDATEDBY=?
+      UPDATE AD_ORGMODULE SET VERSION = ?, UPDATED=NOW(), UPDATEDBY=?
       WHERE AD_CLIENT_ID = ?
       AND AD_ORG_ID = ?
       AND AD_MODULE_ID = ?
diff -r 3e4ba05c6ca0 -r b1b58a335fa9 
src/org/openbravo/erpCommon/modules/ModuleReferenceDataOrgTree.java
--- a/src/org/openbravo/erpCommon/modules/ModuleReferenceDataOrgTree.java       
Tue Nov 16 13:16:29 2010 +0100
+++ b/src/org/openbravo/erpCommon/modules/ModuleReferenceDataOrgTree.java       
Wed Nov 17 03:27:02 2010 +0000
@@ -189,6 +189,7 @@
     OBCriteria<DataSet> criteria = 
OBDal.getInstance().createCriteria(DataSet.class);
     criteria.add(Expression.eq(DataSet.PROPERTY_MODULE, 
OBDal.getInstance().get(Module.class,
         moduleId)));
+    criteria.addOrderBy(DataSet.PROPERTY_ID, true);
     List<DataSet> datasets = criteria.list();
     String checksum = "";
     for (DataSet ds : datasets) {

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to