Fixed issue 26395: Create a sales invoice in grid & save it by losing focus
authorGuillermo Gil <guillermo.gil@openbravo.com>
Mon, 28 Apr 2014 11:21:55 +0200
changeset 22918 5470b601b14e
parent 22917 5c2bc1f004c2
child 22919 5e12d35b76c2
Fixed issue 26395: Create a sales invoice in grid & save it by losing focus

On create a new record this.getEditRow() does not exists, used rowNum instead this.getEditRow()
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 Apr 28 10:35:07 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Mon Apr 28 11:21:55 2014 +0200
@@ -2893,7 +2893,7 @@
     // Update the focus cell value if different from edit form values.
     // To avoid the case where sometimes data updated through trigger is not showing up without refreshing.
     // Refer issue https://issues.openbravo.com/view.php?id=25028
-    this.setEditValue(this.getEditRow(), this.getField(colNum).name, record[this.getField(colNum).name], true, true);
+    this.setEditValue(rowNum, this.getField(colNum).name, record[this.getField(colNum).name], true, true);
 
     if (this.getEditRow() === rowNum) {
       this.getEditForm().markForRedraw();