[Frappe 8.0.4] listview_settings settings file not loaded?

Hi there,

i’ve added addetto_reparto_list.js in the doctype folder with:

frappe.listview_settings['Addetto Reparto'] = {
	add_fields: ["enabled"],
	get_indicator: function(doc) {
		if(doc.enabled) {
			return [__("Active"), "green", "enabled,=,Yes"];
		} else {
			return [__("Disabled"), "grey", "enabled,=,No"];
		}
	}
};

But it doesn’t change indicators, can be a bug?

Frappe version 8.0.4

Does this help:

What’s the difference?

I meant that you could try using cint, because the values for the field enabled are “Yes” and “No”.

Also, you have mentioned that the script is in the “doctype” folder. You probably meant “addetto_reparto” folder but just confirm that.

Yup, i mean addetto_reparto …I think is not a problem of cint …same code is working for User Doctype. It seems addetto_reparto_list.js is not included properly

I tried this with my doctype. When I make an error intentionally in add_fields, I am able to view it in the console, but when the things are alright, I can not see the output of my code. This looks to me like a bug.

The added fields are visible when I execute cur_list.list_renderer.fields from the console but same don’t display in view.

Thx for the info, better to open an issue

1 Like

Got the issue …mi speed file name :grin: