fix: don't show "create" on cancelled BOMs (#29570)

This commit is contained in:
Ankush Menat 2022-02-01 17:40:06 +05:30 committed by GitHub
parent 4055cc76a7
commit a3a05c0c23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"));