mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-04 19:14:41 +00:00
fix(ux): "New Version" button BOM
"duplicate" technically creates a new version but that's not intuitive at all.
This commit is contained in:
@@ -93,6 +93,11 @@ frappe.ui.form.on("BOM", {
|
||||
});
|
||||
}
|
||||
|
||||
frm.add_custom_button(__("New Version"), function() {
|
||||
let new_bom = frappe.model.copy_doc(frm.doc);
|
||||
frappe.set_route("Form", "BOM", new_bom.name);
|
||||
});
|
||||
|
||||
if(frm.doc.docstatus==1) {
|
||||
frm.add_custom_button(__("Work Order"), function() {
|
||||
frm.trigger("make_work_order");
|
||||
|
||||
Reference in New Issue
Block a user