Fixes issue 19719: All records are now deselected when applying a view
authorAugusto Mauch <augusto.mauch@openbravo.com>
Tue, 14 Feb 2012 11:14:51 +0100
changeset 15484 cffed2981aae
parent 15483 f52dabf2bdc4
child 15485 34aaf22a4ca0
Fixes issue 19719: All records are now deselected when applying a 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	Mon Feb 13 17:58:29 2012 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Tue Feb 14 11:14:51 2012 +0100
@@ -490,6 +490,10 @@
     }
 
     if (this.getDataSource()) {
+      //If the new state does not have any selected records then all the records of the view are deselected
+      if (!localState.selected) {
+        this.deselectAllRecords();
+      } 
       // old versions stored selected records in grid view, this can cause
       // problems if record is not selected yet
       delete localState.selected;