Fixes issue 25518: Record selections are not wrongfully cleared
authorAugusto Mauch <augusto.mauch@openbravo.com>
Tue, 21 Jan 2014 12:31:02 +0100
changeset 22033 57294cc35029
parent 22032 495a35fb404a
child 22034 510340c73c50
Fixes issue 25518: Record selections are not wrongfully cleared

If the grid is filtering lazily, the initial automatical fetch must be prevented. The problem was that not only this was being prevented, also this command was
not being executed it lazyFiltering was true:

this.refreshContents = false;
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Fri Feb 07 12:56:56 2014 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Tue Jan 21 12:31:02 2014 +0100
@@ -11,7 +11,7 @@
  * 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-2013 Openbravo SLU
+ * All portions are Copyright (C) 2010-2014 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -310,9 +310,11 @@
     // directTabInfo is set when we are in direct link mode, i.e. directly opening
     // a specific tab with a record, the direct link logic will already take care
     // of fetching data
-    if (this.isRootView && !this.standardWindow.directTabInfo && !lazyFiltering) {
-      if (!this.standardWindow.checkIfDefaultSavedView()) {
-        this.viewGrid.fetchData(this.viewGrid.getCriteria());
+    if (this.isRootView && !this.standardWindow.directTabInfo) {
+      if (!lazyFiltering) {
+        if (!this.standardWindow.checkIfDefaultSavedView()) {
+          this.viewGrid.fetchData(this.viewGrid.getCriteria());
+        }
       }
       this.refreshContents = false;
     }