diff --git a/frappe/public/js/frappe/list/list_view.js b/frappe/public/js/frappe/list/list_view.js index ba512af2a1..68030223ca 100644 --- a/frappe/public/js/frappe/list/list_view.js +++ b/frappe/public/js/frappe/list/list_view.js @@ -712,9 +712,10 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList { get_column_html(col, doc) { if (col.type === "Status" || col.df?.options == "Workflow State") { + let show_workflow_state = col.df?.options == "Workflow State"; return ` `; } @@ -1014,8 +1015,8 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList { return subject_html; } - get_indicator_html(doc) { - const indicator = frappe.get_indicator(doc, this.doctype); + get_indicator_html(doc, show_workflow_state) { + const indicator = frappe.get_indicator(doc, this.doctype, show_workflow_state); // sequence is important const docstatus_description = [ __("Document is in draft state"), diff --git a/frappe/public/js/frappe/model/indicator.js b/frappe/public/js/frappe/model/indicator.js index 2f84974758..4413020391 100644 --- a/frappe/public/js/frappe/model/indicator.js +++ b/frappe/public/js/frappe/model/indicator.js @@ -23,7 +23,7 @@ frappe.has_indicator = function (doctype) { return false; }; -frappe.get_indicator = function (doc, doctype) { +frappe.get_indicator = function (doc, doctype, show_workflow_state) { if (doc.__unsaved) { return [__("Not Saved"), "orange"]; } @@ -40,7 +40,7 @@ frappe.get_indicator = function (doc, doctype) { workflow_fieldname = frappe.workflow.get_state_fieldname(doctype); // workflow - if (workflow_fieldname && !without_workflow) { + if (workflow_fieldname && (!without_workflow || show_workflow_state)) { var value = doc[workflow_fieldname]; if (value) { var colour = "";