[OBUISEL]Filter by org FK filter combo's.
authorGorka Ion Damián <gorkaion.damian@openbravo.com>
Tue, 08 Mar 2011 18:40:31 +0100
changeset 11119 ee140835baf7
parent 11118 9e6ab77d2e31
child 11120 170ecb800acb
[OBUISEL]Filter by org FK filter combo's.
modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-filter-select-item.js
--- a/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-filter-select-item.js	Tue Mar 08 18:39:55 2011 +0100
+++ b/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-filter-select-item.js	Tue Mar 08 18:40:31 2011 +0100
@@ -34,6 +34,24 @@
       return '';
     }
     return ret;
+  },
+
+  filterDataBoundPickList : function (requestProperties, dropCache){
+    requestProperties = requestProperties || {};
+    requestProperties.params = requestProperties.params || {};
+    // on purpose not passing the third boolean param
+    var contextInfo = this.selectorWindow.selector.form.view.getContextInfo(false, true);
+    
+    // also add the special ORG parameter
+    if (this.selectorWindow.selector.form.getField('organization')) {
+      requestProperties.params[OB.Constants.ORG_PARAMETER] =
+        this.selectorWindow.selector.form.getValue('organization');
+    } else if (contextInfo.inpadOrgId) {
+      requestProperties.params[OB.Constants.ORG_PARAMETER] = contextInfo.inpadOrgId;
+    }
+    
+    return this.Super('filterDataBoundPickList', [requestProperties, dropCache]);
   }
 
+
 });