From b13c4e25161f2098850666c1358c9fcb5bd23855 Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Fri, 13 Feb 2015 12:37:57 +0530 Subject: [PATCH] filters added to warehouses in prod order --- .../doctype/production_order/production_order.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/production_order/production_order.js b/erpnext/manufacturing/doctype/production_order/production_order.js index 57363f0556..8ab6237104 100644 --- a/erpnext/manufacturing/doctype/production_order/production_order.js +++ b/erpnext/manufacturing/doctype/production_order/production_order.js @@ -219,4 +219,15 @@ var calculate_cost = function(doc) { frappe.ui.form.on("Production Order Operation", "time_in_mins", function(frm, cdt, cdn) { calculate_cost(frm.doc); calculate_total_cost(frm) -}); \ No newline at end of file +}); + +var company_filter = function(doc) { + return{ + filters: { + 'company': doc.company + } + } +} + +cur_frm.fields_dict.fg_warehouse.get_query = company_filter +cur_frm.fields_dict.wip_warehouse.get_query = company_filter