From 0fd67b23f40534741eecffda47300cc9778b680a Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 26 Nov 2015 10:37:24 +0530 Subject: [PATCH] [minor] duplicate button on BOM cancel --- erpnext/manufacturing/doctype/bom/bom.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js index 9883ba30f6..84f217582e 100644 --- a/erpnext/manufacturing/doctype/bom/bom.js +++ b/erpnext/manufacturing/doctype/bom/bom.js @@ -19,6 +19,14 @@ frappe.ui.form.on("BOM", { frappe.set_route("bom-browser", frm.doc.name); }); } + + if(frm.doc.docstatus==2) { + // show duplicate button when BOM is cancelled, + // its not very intuitive + frm.add_custom_button(__("Duplicate"), function() { + frm.copy_doc(); + }); + } }, update_cost: function(frm) { return frappe.call({