diff --git a/erpnext/manufacturing/doctype/production_order/production_order.js b/erpnext/manufacturing/doctype/production_order/production_order.js index 57363f0556e..8ab6237104c 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