Fixes issue 15751: Fixes in-field values as GET parameter
authorIván Perdomo <ivan.perdomo@openbravo.com>
Tue, 08 Mar 2011 17:38:14 +0100
changeset 11112 1e4f6fe09807
parent 11111 f86ffe5c4524
child 11113 dcea0231fee9
Fixes issue 15751: Fixes in-field values as GET parameter
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-formitem-widgets.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-formitem-widgets.js	Tue Mar 08 17:37:32 2011 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-formitem-widgets.js	Tue Mar 08 17:38:14 2011 +0100
@@ -104,7 +104,7 @@
   isc.OBSearchItem.openedWindow.close();
   isc.OBSearchItem.openSearchItem = null;
 };
-}(this));
+}(this)); // window
 
 isc.OBSearchItem.addProperties({
   operator: 'iContains',
@@ -196,11 +196,10 @@
     values = view.getContextInfo(false, true, true, true);
     length = this.inFields.length;
     for (i = 0; i < length; i++) {
-      inpName = this.inFields[i];
+      inpName = this.inFields[i].columnName;
       propDef = view.getPropertyDefinitionFromInpColumnName(inpName);
-      if (propDef && values[inpName]) {        
-        // note the name passed is not the same as the inp name, it is inp + dbcolumn
-        parameters[index++] = 'inp' + propDef.dbColumn;
+      if (propDef && values[inpName]) {
+        parameters[index++] = this.inFields[i].parameterName;
         parameters[index++] = values[inpName];
         // and to be save also pass the value as the input name
         parameters[index++] = inpName;
@@ -209,7 +208,7 @@
     }
     this.openSearchWindow(this.searchUrl, parameters, this.getValue());
   },
-  
+
   openSearchWindow: function(url, parameters, strValueID){
     var height, width, top, left;
     var complementsNS4 = '';