details:   https://code.openbravo.com/erp/devel/pi/rev/ee157fef9c33
changeset: 26886:ee157fef9c33
user:      Carlos Aristu <carlos.aristu <at> openbravo.com>
date:      Tue Jun 09 18:14:54 2015 +0200
summary:   Fixes issue 30060: Select Payments Pick&Edit window is not working 
properly

When selecting a record in a P&E grid, the request done to the FIC was not 
using the correct mode. Now, when selecting a record, the request is properly 
done using the EDIT mode.

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-grid.js
 |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r 780731085f0c -r ee157fef9c33 
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
      Tue Jun 09 18:01:36 2015 +0200
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-grid.js
      Tue Jun 09 18:14:54 2015 +0200
@@ -793,13 +793,17 @@
   },
 
   retrieveInitialValues: function (rowNum, colNum, newCell, newRow, 
suppressFocus) {
-    var requestParams, allProperties, i, record;
+    var requestParams, allProperties, i, record, newRecord;
 
     allProperties = this.getContextInfo(rowNum);
     record = this.getRecord(rowNum);
 
+    // we can't rely on newRow value to know if we're inserting a new record,
+    // a new record is being created if record has no value
+    newRecord = !record;
+
     requestParams = {
-      MODE: (newRow ? 'NEW' : 'EDIT'),
+      MODE: (newRecord ? 'NEW' : 'EDIT'),
       PARENT_ID: null,
       TAB_ID: this.viewProperties.tabId,
       ROW_ID: (!newRow && record ? record[OB.Constants.ID] : null)

------------------------------------------------------------------------------
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to