From af2b39891e097bf1db55e549410c331377c92595 Mon Sep 17 00:00:00 2001 From: Yugandhara Date: Sat, 15 Feb 2020 16:01:41 +0530 Subject: [PATCH] fix: Changes done to get valid sales order list on sales order child table of production plan --- .../doctype/production_plan/production_plan.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.js b/erpnext/manufacturing/doctype/production_plan/production_plan.js index 2b168d1d76..4e92ee2d0a 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.js +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.js @@ -296,3 +296,11 @@ frappe.ui.form.on("Material Request Plan Item", { } } }); + +cur_frm.fields_dict['sales_orders'].grid.get_field("sales_order").get_query = function(doc, cdt, cdn) { + return{ + filters: [ + ['Sales Order','docstatus', '=' ,1] + ] + } +}; \ No newline at end of file