NCP
August 28, 2024, 4:03am
3
Indicators cannot be set for two fields at the same time. If the indicator is set for the status field, it won’t be set for any other field. To achieve this, you will need to apply custom logic. I’ve provided a reference for you. You’ll need to override the Employee list code first.
frappe.listview_settings["Employee"] = {
add_fields: ["status", "branch", "department", "designation", "image"],
filters: [["status", "=", "Active"]],
get_indicator: function (doc) {
var indicator = [__(doc.status), frappe.utils.guess_colour(doc.status), "status,=," + doc.status];
indicator[1] = { Active: "green", Inactive: "red", Left: "gray", Suspended: "orange" }[doc.status];
return indicator;
},
};
Reference:
Hi @iamtalib13 ,
Indicators are not set in two fields at the same time. If the indicator is set for status, none of the other fields will be set. For that you have to apply custom logic, here I have given you reference, you have to overwrite the stock entry list code first.
I have done the logic for stock entry purpose, so you set the logic according to you!
function extend_listview_event(doctype, event, callback) {
if (!frappe.listview_settings[doctype]) {
frappe.listview_settings…
1 Like