Warehouse query filtered by company
diff --git a/erpnext/public/js/queries.js b/erpnext/public/js/queries.js
index 1f404db..b57b765 100644
--- a/erpnext/public/js/queries.js
+++ b/erpnext/public/js/queries.js
@@ -67,5 +67,11 @@
 
 	employee: function() {
 		return { query: "erpnext.controllers.queries.employee_query" }
+	},
+
+	warehouse: function(doc) {
+		return {
+			filters: [["Warehouse", "company", "in", ["", doc.company]]]
+		}
 	}
 });