Fixes issue 28727: Use proper attribute names in the valueMap of the combo
authorAugusto Mauch <augusto.mauch@openbravo.com>
Mon, 16 Mar 2015 18:01:47 +0100
changeset 26191 efa53163ee0c
parent 26190 a882ebfc5ae6
child 26192 9cb33bf7fc79
Fixes issue 28727: Use proper attribute names in the valueMap of the combo

The ListGrid.setValueMap function expected a valueMap that is an array, where each position contains an object with two properties: id and _identifier (OB.Constants.ID and OB.Constants.IDENTIFIER constants). The identifier property was not being properly named, so the valueMap did not contain the proper values.
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 16 16:57:41 2015 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-grid.js	Mon Mar 16 18:01:47 2015 +0100
@@ -703,10 +703,9 @@
     if (columnValue.entries) {
       this.setValueMap(field.name, columnValue.entries);
     } else if (field.fkField && columnValue.value && columnValue.identifier) {
-      valueMap[0] = {
-        id: columnValue.value,
-        identifier: columnValue.identifier
-      };
+      valueMap[0] = {};
+      valueMap[0][OB.Constants.ID] = columnValue.value;
+      valueMap[0][OB.Constants.IDENTIFIER] = columnValue.identifier;
       this.setValueMap(field.name, valueMap);
     }
   },