Skip to content

Commit

Permalink
fix: show work order progress bar even it is closed (#29312)
Browse files Browse the repository at this point in the history
  • Loading branch information
anupamvs committed Jan 17, 2022
1 parent 66bf21f commit 4d48035
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions erpnext/manufacturing/doctype/work_order/work_order.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,14 @@ frappe.ui.form.on("Work Order", {
erpnext.work_order.set_custom_buttons(frm);
frm.set_intro("");

if (frm.doc.docstatus === 0 && !frm.doc.__islocal) {
if (frm.doc.docstatus === 0 && !frm.is_new()) {
frm.set_intro(__("Submit this Work Order for further processing."));
} else {
frm.trigger("show_progress_for_items");
frm.trigger("show_progress_for_operations");
}

if (frm.doc.status != "Closed") {
if (frm.doc.docstatus===1) {
frm.trigger('show_progress_for_items');
frm.trigger('show_progress_for_operations');
}

if (frm.doc.docstatus === 1
&& frm.doc.operations && frm.doc.operations.length) {

Expand Down

0 comments on commit 4d48035

Please sign in to comment.