fixed bug 25634, fixed bug 25635, fixed bug 25636
authorAsier Lostalé <asier.lostale@openbravo.com>
Tue, 04 Feb 2014 16:12:14 +0100
changeset 22027 76dfa3fc16df
parent 22026 76d795dfdcd7
child 22028 be31d39cd9fb
fixed bug 25634, fixed bug 25635, fixed bug 25636

Proper management of filtering removal within windows with saved views that
include filtering.

This filtering was preserved in initialCriteria which was retrieved after filter
was removed.
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Tue Feb 04 17:44:22 2014 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Tue Feb 04 16:12:14 2014 +0100
@@ -1093,7 +1093,9 @@
       if (this.filterEditor && !this.filterEditor.getEditForm()) {
         this.filterEditor.setValuesAsCriteria(localState.filter);
       }
-
+      // this initial criteria needs to be removed in order to properly
+      // manage filtering clean up
+      this.initialCriteriaSetBySavedView = true;
       this.setCriteria(localState.filter);
     }
   },
@@ -1556,6 +1558,11 @@
     }
     delete this.isOpenDirectMode;
 
+    if (this.initialCriteriaSetBySavedView) {
+      delete this.initialCriteria;
+      delete this.initialCriteriaSetBySavedView;
+    }
+
     if (!this.targetRecordId) {
       delete this.isOpenDirectModeLeaf;
     }