Solve issue with extra ._identifier filtering
authorMartin Taal <martin.taal@openbravo.com>
Tue, 08 Mar 2011 15:23:53 +0100
changeset 11095 83f5834158f1
parent 11094 894a91f93223
child 11096 9af9632e9a14
Solve issue with extra ._identifier filtering
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js	Tue Mar 08 15:11:37 2011 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js	Tue Mar 08 15:23:53 2011 +0100
@@ -94,6 +94,17 @@
     }
     
     this.filterEditorProperties = {
+
+      setEditValue : function (rowNum, colNum, newValue, suppressDisplay, suppressChange) {
+        // prevent any setting of non fields in the filter editor
+        // this prevents a specific issue that smartclient will set a value
+        // in the {field.name}._identifier (for example warehouse._identifier)
+        // because it thinks that the field does not have its own datasource
+        if (isc.isA.String(colNum) && !this.getField(colNum)) {
+          return;
+        }
+        return this.Super('setEditValue', arguments);
+      },
         
       getValuesAsCriteria : function (advanced, textMatchStyle, returnNulls) {
         return this.Super('getValuesAsCriteria', [true, textMatchStyle, returnNulls]);