diff --git a/src-db/database/sourcedata/OBUISEL_SELECTOR_FIELD.xml b/src-db/database/sourcedata/OBUISEL_SELECTOR_FIELD.xml
--- a/src-db/database/sourcedata/OBUISEL_SELECTOR_FIELD.xml
+++ b/src-db/database/sourcedata/OBUISEL_SELECTOR_FIELD.xml
@@ -2250,7 +2250,7 @@
 <!--6E60C08DA25D43F597380B6A307F98EA-->  <SORTNO><![CDATA[10]]></SORTNO>
 <!--6E60C08DA25D43F597380B6A307F98EA-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--6E60C08DA25D43F597380B6A307F98EA-->  <ISOUTFIELD><![CDATA[N]]></ISOUTFIELD>
-<!--6E60C08DA25D43F597380B6A307F98EA-->  <DEFAULT_EXPRESSION><![CDATA[if (OB.getWindowId() && OB.getSession().getAttribute(OB.getWindowId() +"|M_WAREHOUSE_ID")) {  OB.getSession().getAttribute(OB.getWindowId() +"|M_WAREHOUSE_ID");} else {  if (OB.getContext().getWarehouse() != null) {    OB.getContext().getWarehouse().id;  }}]]></DEFAULT_EXPRESSION>
+<!--6E60C08DA25D43F597380B6A307F98EA-->  <DEFAULT_EXPRESSION><![CDATA[OB.getFilterExpression('org.openbravo.erpCommon.info.WarehouseOrganizationFilterExpression'); ]]></DEFAULT_EXPRESSION>
 <!--6E60C08DA25D43F597380B6A307F98EA-->  <DISPLAY_EXPRESSION><![CDATA[warehouse]]></DISPLAY_EXPRESSION>
 <!--6E60C08DA25D43F597380B6A307F98EA-->  <CLAUSE_LEFT_PART><![CDATA[l.warehouse.name]]></CLAUSE_LEFT_PART>
 <!--6E60C08DA25D43F597380B6A307F98EA-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
diff --git a/src/org/openbravo/erpCommon/info/WarehouseOrganizationFilterExpression.java b/src/org/openbravo/erpCommon/info/WarehouseOrganizationFilterExpression.java
new file mode 100644
--- /dev/null
+++ b/src/org/openbravo/erpCommon/info/WarehouseOrganizationFilterExpression.java
@@ -0,0 +1,70 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html 
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License. 
+ * The Original Code is Openbravo ERP. 
+ * The Initial Developer of the Original Code is Openbravo SLU 
+ * All portions are Copyright (C) 2017 Openbravo SLU 
+ * All Rights Reserved. 
+ * Contributor(s):  
+ *   Andy Armaignac Collazo <collazoandy4@gmail.com>
+ ************************************************************************
+ */
+
+package org.openbravo.erpCommon.info;
+
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.commons.lang.StringUtils;
+import org.hibernate.criterion.Restrictions;
+import org.openbravo.client.application.FilterExpression;
+import org.openbravo.dal.core.OBContext;
+import org.openbravo.dal.service.OBCriteria;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.dal.service.OBDao;
+import org.openbravo.model.common.enterprise.Organization;
+import org.openbravo.model.common.enterprise.Warehouse;
+
+public class WarehouseOrganizationFilterExpression implements FilterExpression {
+
+  @Override
+  public String getExpression(Map<String, String> _requestMap) {
+
+    final OBCriteria<Warehouse> warehouseCriteria = OBDal.getInstance().createCriteria(
+        Warehouse.class);
+    String orgId = _requestMap.get("inpadOrgId");
+    String orgs = getOrgs(orgId);
+    warehouseCriteria.add(Restrictions.in(Warehouse.PROPERTY_ORGANIZATION,
+        OBDao.getOBObjectListFromString(Organization.class, orgs)));
+    warehouseCriteria.setFilterOnReadableOrganization(false);
+
+    warehouseCriteria.setMaxResults(1);
+    return ((Warehouse) warehouseCriteria.uniqueResult()).getId();
+  }
+
+  private String getOrgs(String orgId) {
+    StringBuffer orgPart = new StringBuffer();
+    if (StringUtils.isNotEmpty(orgId)) {
+      final Set<String> orgSet = OBContext.getOBContext().getOrganizationStructureProvider()
+          .getNaturalTree(orgId);
+      if (orgSet.size() > 0) {
+        boolean addComma = false;
+        for (String org : orgSet) {
+          if (addComma) {
+            orgPart.append(",");
+          }
+          orgPart.append("'" + org + "'");
+          addComma = true;
+        }
+      }
+    }
+    return orgPart.toString();
+  }
+}
