diff --git a/manufacturing/doctype/bom_replace_tool/bom_replace_tool.js b/manufacturing/doctype/bom_replace_tool/bom_replace_tool.js index 60e88848c9..c98603cfb9 100644 --- a/manufacturing/doctype/bom_replace_tool/bom_replace_tool.js +++ b/manufacturing/doctype/bom_replace_tool/bom_replace_tool.js @@ -15,6 +15,10 @@ // along with this program. If not, see . +cur_frm.cscript.refresh = function(doc) { + cur_frm.disable_save(); +} + cur_frm.set_query("current_bom", function(doc) { return erpnext.queries.bom({name: "!" + doc.new_bom}); }); diff --git a/manufacturing/doctype/production_planning_tool/production_planning_tool.js b/manufacturing/doctype/production_planning_tool/production_planning_tool.js index 970da65c28..5d9a936268 100644 --- a/manufacturing/doctype/production_planning_tool/production_planning_tool.js +++ b/manufacturing/doctype/production_planning_tool/production_planning_tool.js @@ -19,6 +19,10 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) { refresh_field("company"); } +cur_frm.cscript.refresh = function(doc) { + cur_frm.disable_save(); +} + cur_frm.cscript.sales_order = function(doc,cdt,cdn) { var d = locals[cdt][cdn]; if (d.sales_order) {