diff --git a/erpnext/manufacturing/doctype/work_order/work_order.js b/erpnext/manufacturing/doctype/work_order/work_order.js index 8a8a6c900cd..007cafc10bf 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.js +++ b/erpnext/manufacturing/doctype/work_order/work_order.js @@ -32,6 +32,14 @@ frappe.ui.form.on("Work Order", { } }); + frm.set_query("sales_order", function() { + return { + filters: { + "status": ["not in", ["Closed", "On Hold"]] + } + } + }); + frm.set_query("fg_warehouse", function() { return { filters: {