From bdb2f9595791050dfa6616ad8aaec0defdcbd83f Mon Sep 17 00:00:00 2001 From: Ishan Loya Date: Tue, 16 May 2017 08:25:07 +0530 Subject: [PATCH] Show duplicate button in BOM unless in draft stage (#8826) --- erpnext/manufacturing/doctype/bom/bom.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js index 5181cf48a5..576e46df50 100644 --- a/erpnext/manufacturing/doctype/bom/bom.js +++ b/erpnext/manufacturing/doctype/bom/bom.js @@ -33,9 +33,7 @@ frappe.ui.form.on("BOM", { }); } - if(frm.doc.docstatus==2) { - // show duplicate button when BOM is cancelled, - // its not very intuitive + if(frm.doc.docstatus!=0) { frm.add_custom_button(__("Duplicate"), function() { frm.copy_doc(); });