Fixes issue 19130: Refresh button has incorrect side effect of clearing column filters / current saved view
authorMartin Taal <martin.taal@openbravo.com>
Wed, 30 Nov 2011 11:15:53 +0100
changeset 14760 a7b3f3c206e4
parent 14759 d4b1d314aa16
child 14761 83d8fb7c2eee
Fixes issue 19130: Refresh button has incorrect side effect of clearing column filters / current saved view
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	Wed Nov 30 11:15:09 2011 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Wed Nov 30 11:15:53 2011 +0100
@@ -1021,7 +1021,7 @@
       criteria.criteria = [];
     }
     
-    if (this.targetRecordId) {
+    if (!this.notRemoveFilter && this.targetRecordId) {
       // do not filter on anything with a targetrecord
       criteria = {
         operator: 'and', 
@@ -1030,11 +1030,6 @@
         
       // add a dummy criteria to force a fetch
       criteria.criteria.push(isc.OBRestDataSource.getDummyCriterion());
-      
-      if (!this.notRemoveFilter) {
-        // remove the filter clause we don't want to use it anymore
-        this.filterClause = null;
-      }
     } else if (this.forceRefresh) {
       // add a dummy criteria to force a fetch
       criteria.criteria.push(isc.OBRestDataSource.getDummyCriterion());