Related to issue 17111: Only compute combos for visible fields
authorMartin Taal <martin.taal@openbravo.com>
Wed, 11 May 2011 10:32:32 +0200
changeset 12093 83fbe0f0716a
parent 12092 0b311d652f33
child 12094 315eeeb8e204
Related to issue 17111: Only compute combos for visible fields
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js	Wed May 11 10:23:37 2011 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js	Wed May 11 10:32:32 2011 +0200
@@ -453,7 +453,7 @@
   retrieveInitialValues: function(isNew){
     this.setParentDisplayInfo();
     
-    var parentId = this.view.getParentId(), requestParams, parentColumn, me = this, mode;
+    var parentId = this.view.getParentId(), i, fldNames = [], requestParams, parentColumn, me = this, mode;
     // note also in this case initial vvalues are passed in as in case of grid
     // editing the unsaved/error values from a previous edit session are maintained
     var allProperties = this.view.getContextInfo(false, true, false, true);
@@ -476,6 +476,14 @@
     }
     allProperties._entityName = this.view.entity;
     
+    // only put the visible field names in the call
+    for (i = 0; i < this.getFields().length; i++) {
+      if (this.getFields()[i].inpColumnName) {
+        fldNames.push(this.getFields()[i].name)
+      }
+    }
+    allProperties._visibleProperties = fldNames;
+    
     this.setDisabled(true);
 
     // note that only the fields with errors are validated anyway