fixed bug 25634, fixed bug 25635, fixed bug 25636
authorAsier Lostalé <asier.lostale@openbravo.com>
Tue, 04 Feb 2014 16:12:14 +0100
changeset 21996 fd2c8a575d9f
parent 21995 903b4584a72e
child 21997 5571b88ed3f0
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
@@ -1086,7 +1086,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);
     }
   },
@@ -1549,6 +1551,11 @@
     }
     delete this.isOpenDirectMode;
 
+    if (this.initialCriteriaSetBySavedView) {
+      delete this.initialCriteria;
+      delete this.initialCriteriaSetBySavedView;
+    }
+
     if (!this.targetRecordId) {
       delete this.isOpenDirectModeLeaf;
     }