details:   https://code.openbravo.com/erp/devel/pi/rev/a66b944d48d7
changeset: 24319:a66b944d48d7
user:      Daniel Ruiz <daniel.ruiz <at> openbravo.com>
date:      Wed Aug 20 11:08:12 2014 +0200
summary:   Related to issue 26867:Changed some files

diffstat:

 src-db/database/sourcedata/AD_MESSAGE.xml                             |  12 
++++++
 src-db/database/sourcedata/OBUIAPP_PARAMETER.xml                      |   2 +-
 src/org/openbravo/materialmgmt/VariantAutomaticGenerationProcess.java |  11 
++---
 web/js/productCharacteristicsProcess.js                               |  19 
++++-----
 4 files changed, 27 insertions(+), 17 deletions(-)

diffs (112 lines):

diff -r 09ce5c4deb2b -r a66b944d48d7 src-db/database/sourcedata/AD_MESSAGE.xml
--- a/src-db/database/sourcedata/AD_MESSAGE.xml Mon Aug 25 00:42:32 2014 +0000
+++ b/src-db/database/sourcedata/AD_MESSAGE.xml Wed Aug 20 11:08:12 2014 +0200
@@ -22025,6 +22025,18 @@
 <!--A028CFDE75274327BF364041696938AE-->  
<ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--A028CFDE75274327BF364041696938AE--></AD_MESSAGE>
 
+<!--A0844A1983A54B4AB60640B28B66C2B2--><AD_MESSAGE>
+<!--A0844A1983A54B4AB60640B28B66C2B2-->  
<AD_MESSAGE_ID><![CDATA[A0844A1983A54B4AB60640B28B66C2B2]]></AD_MESSAGE_ID>
+<!--A0844A1983A54B4AB60640B28B66C2B2-->  
<AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--A0844A1983A54B4AB60640B28B66C2B2-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--A0844A1983A54B4AB60640B28B66C2B2-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--A0844A1983A54B4AB60640B28B66C2B2-->  <VALUE><![CDATA[HighRecords]]></VALUE>
+<!--A0844A1983A54B4AB60640B28B66C2B2-->  <MSGTEXT><![CDATA[The number of 
records is too high. Please, try to review product characteristics.]]></MSGTEXT>
+<!--A0844A1983A54B4AB60640B28B66C2B2-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--A0844A1983A54B4AB60640B28B66C2B2-->  
<AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--A0844A1983A54B4AB60640B28B66C2B2-->  
<ISINCLUDEINI18N><![CDATA[Y]]></ISINCLUDEINI18N>
+<!--A0844A1983A54B4AB60640B28B66C2B2--></AD_MESSAGE>
+
 <!--A089F37D301F43C6A4E133F1BEC13706--><AD_MESSAGE>
 <!--A089F37D301F43C6A4E133F1BEC13706-->  
<AD_MESSAGE_ID><![CDATA[A089F37D301F43C6A4E133F1BEC13706]]></AD_MESSAGE_ID>
 <!--A089F37D301F43C6A4E133F1BEC13706-->  
<AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
diff -r 09ce5c4deb2b -r a66b944d48d7 
src-db/database/sourcedata/OBUIAPP_PARAMETER.xml
--- a/src-db/database/sourcedata/OBUIAPP_PARAMETER.xml  Mon Aug 25 00:42:32 
2014 +0000
+++ b/src-db/database/sourcedata/OBUIAPP_PARAMETER.xml  Wed Aug 20 11:08:12 
2014 +0200
@@ -208,7 +208,7 @@
 <!--6B15654D49A4408DBC25E63836D02199-->  
<STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
 <!--6B15654D49A4408DBC25E63836D02199-->  
<DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
 <!--6B15654D49A4408DBC25E63836D02199-->  
<DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
-<!--6B15654D49A4408DBC25E63836D02199-->  
<ONGRIDLOADFUNCTION><![CDATA[OB.ProductCharacteristics.TestOnGridLoad]]></ONGRIDLOADFUNCTION>
+<!--6B15654D49A4408DBC25E63836D02199-->  
<ONGRIDLOADFUNCTION><![CDATA[OB.ProductCharacteristics.testOnGridLoad]]></ONGRIDLOADFUNCTION>
 <!--6B15654D49A4408DBC25E63836D02199--></OBUIAPP_PARAMETER>
 
 <!--6B8309393CF44CCD977219C72458D625--><OBUIAPP_PARAMETER>
diff -r 09ce5c4deb2b -r a66b944d48d7 
src/org/openbravo/materialmgmt/VariantAutomaticGenerationProcess.java
--- a/src/org/openbravo/materialmgmt/VariantAutomaticGenerationProcess.java     
Mon Aug 25 00:42:32 2014 +0000
+++ b/src/org/openbravo/materialmgmt/VariantAutomaticGenerationProcess.java     
Wed Aug 20 11:08:12 2014 +0200
@@ -21,7 +21,6 @@
 import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Date;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -131,7 +130,7 @@
       boolean hasNext = true;
       int productNo = 0;
       int k = 0;
-      Long start = new Date().getTime();
+      Long start = System.currentTimeMillis();
       do {
         k = k + 1;
         // Create variant product
@@ -197,14 +196,14 @@
         }
         productNo++;
 
-        // Create variants from 1 to 1000.
+        // Creates variants from 1 to 1000 and shows time spent on it.
         if (k == 1000) {
           OBDal.getInstance().flush();
           OBDal.getInstance().getSession().clear();
-          log4j.error("dentro bucle variants: " + productNo + " : "
-              + ((new Date().getTime()) - (start)));
+          log4j.debug("Variants loop: " + productNo + " : "
+              + ((System.currentTimeMillis()) - (start)));
           k = 0;
-          start = new Date().getTime();
+          start = System.currentTimeMillis();
         }
 
       } while (hasNext);
diff -r 09ce5c4deb2b -r a66b944d48d7 web/js/productCharacteristicsProcess.js
--- a/web/js/productCharacteristicsProcess.js   Mon Aug 25 00:42:32 2014 +0000
+++ b/web/js/productCharacteristicsProcess.js   Wed Aug 20 11:08:12 2014 +0200
@@ -52,17 +52,17 @@
     OB.ProductCharacteristics.execute(params, view);
   },
   
-  TestOnGridLoad: function (grid) {
-         var nRecordsReceived = grid.getData().getLength(),
-             messageBar = grid.view.messageBar;
-         if (nRecordsReceived==0){
-                 messageBar.setMessage('info', 'The number of records is too 
high. Please, try to review product characteristics.');
-         }
-         //messageBar.setMessage('info', 'The number of records is too high. 
Please, try to review product characteristics.');
+  //Shows a message in order to notify that number of records is too high, so
+  //product characteristics should be changed.
+  testOnGridLoad: function(grid) {
+           var nRecordsReceived = grid.getData().getLength(),
+               messageBar = grid.view.messageBar;
+           if (nRecordsReceived == 0) {
+               messageBar.setMessage('info', OB.I18N.getLabel('HighRecords'));
+           }
        },
 };
 
-
 isc.defineClass('UpdateInvariantCharacteristicsPopup', isc.OBPopup);
 
 // This popup will show a combo for each of the product invariant
@@ -86,8 +86,7 @@
     var originalView = this.view,
         params = this.params,
         i;
-
-        
+   
     // Populates the combos using the provided characteristicList
     this.characteristicCombos = [];
     for (i = 0; i < this.characteristicList.length; i++) {

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to