Fixes issue 22521: In P&E the selection is not removed when sorting the grid
authorAugusto Mauch <augusto.mauch@openbravo.com>
Fri, 25 Jan 2013 15:26:55 +0100
changeset 19451 98f945713fd4
parent 19450 d0d2ca046bbb
child 19452 81e70c75d9a8
child 19453 c141a066c7d0
Fixes issue 22521: In P&E the selection is not removed when sorting the grid

When a record was selected by clicking on an area other than the checkbox, the record was deselected when a column was sorted. This was caused because the selectionUpdated function, that was in charge of keeping the list of selected records, was only being called when the record was clicked on its checkbox.

This has been fixed by executing that function inside the selectionChanged function, that is executed when a record is selected, regardless if the click has been done in the checkbox.
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-grid.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-grid.js	Fri Jan 25 14:31:21 2013 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-grid.js	Fri Jan 25 15:26:55 2013 +0100
@@ -185,6 +185,8 @@
       this.discardEdits(recordIdx);
     }
 
+    this.selectionUpdated(record, this.getSelectedRecords());
+
     this.Super('selectionChanged', arguments);
   },