Fixes bug 29374: Warehouse field of Manage Reservation P&E shows a proper value
authorAugusto Mauch <augusto.mauch@openbravo.com>
Mon, 23 Mar 2015 17:14:45 +0100
changeset 26221 3da15b275c37
parent 26220 ed3abcacc08c
child 26222 bf012d0fa4b1
Fixes bug 29374: Warehouse field of Manage Reservation P&E shows a proper value

The is a bug in that P&E, reported here [1], that makes the FIC return the wrong value for the warehouse field of the Manage Reservation P&E window. Before [2] was fixed, [1] did not have any consequences, as the value returned by the FIC was not set to the row being edited.

To fix this, the values returned by the FIC are only set if the field is editable. [1] will have to be fixed anyway, because even if now it does not crete problems in this flow, it could be causing problems in others.

[1] https://issues.openbravo.com/view.php?id=29381
[2] https://issues.openbravo.com/view.php?id=28727
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	Mon Mar 23 15:23:47 2015 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-grid.js	Mon Mar 23 17:14:45 2015 +0100
@@ -702,7 +702,7 @@
     }
     if (columnValue.entries) {
       this.setValueMap(field.name, columnValue.entries);
-    } else if (field.fkField && columnValue.value && columnValue.identifier) {
+    } else if (field.fkField && columnValue.value && columnValue.identifier && field.canEdit !== false) {
       // build the valueMap manually, set it and set the value of the
       // fk combo item in the edit form if possible
       valueMap[0] = {};
@@ -710,7 +710,7 @@
       valueMap[0][OB.Constants.IDENTIFIER] = columnValue.identifier;
       this.setValueMap(field.name, valueMap);
       if (this.isEditing()) {
-          this.setEditValue(this.getEditRow(), field.name, columnValue.value);  
+        this.setEditValue(this.getEditRow(), field.name, columnValue.value);
       }
     }
   },