[minor] duplicate button on BOM cancel
diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js
index 9883ba3..84f2175 100644
--- a/erpnext/manufacturing/doctype/bom/bom.js
+++ b/erpnext/manufacturing/doctype/bom/bom.js
@@ -19,6 +19,14 @@
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({