From ffbf7ec3b748e91bc954ed596e67da2671aced18 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 1 Feb 2022 17:44:13 +0530 Subject: [PATCH] fix: don't show "create" on cancelled BOMs (#29570) (#29572) (cherry picked from commit a3a05c0c23be03edf46353ee3121426485eca36f) Co-authored-by: Ankush Menat --- erpnext/manufacturing/doctype/bom/bom.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js index 34d6d012418..f24fd24d1ff 100644 --- a/erpnext/manufacturing/doctype/bom/bom.js +++ b/erpnext/manufacturing/doctype/bom/bom.js @@ -93,7 +93,7 @@ frappe.ui.form.on("BOM", { }); } - if(frm.doc.docstatus!=0) { + if(frm.doc.docstatus==1) { frm.add_custom_button(__("Work Order"), function() { frm.trigger("make_work_order"); }, __("Create"));