Customize Material Request Listview


We are trying to customize Material Request Listview.
Understand that the current listview is generated by the following :

 frappe.listview_settings['Material Request'] = {
 	add_fields: ["material_request_type", "status", "per_ordered"],
 	get_indicator: function(doc) {
 		if(doc.status=="Stopped") {
 			return [__("Stopped"), "red", "status,=,Stopped"];
		} else if(doc.docstatus==1 && flt(doc.per_ordered, 2) < 100) {
 			return [__("Pendingggg"), "orange", "per_ordered,<,100"];
 		} else if(doc.docstatus==1 && flt(doc.per_ordered, 2) == 100) {
 			if (doc.material_request_type == "Purchase") {
 				return [__("Ordered"), "green", "per_ordered,=,100"];
 			} else if (doc.material_request_type == "Material Transfer") {
 				return [__("Transfered"), "green", "per_ordered,=,100"];
 			} else if (doc.material_request_type == "Material Issue") {
 				return [__("Issued"), "green", "per_ordered,=,100"];

We would like to customize the above listview (i.e. to add another else statement).
Upon reading online, we discovered that we would need to create a public folder and write a build.js.

Our public folder inside our custom app contains the js folder with our customised material_request_list.js
And our build.json is as following :

	"js/erpnext.min.js": [

When we ran bench build, this was replicated in /assets in sites.

However, our customised material_request_list.js is not reflected on the site after bench restart.
Kindly advice if we are missing something.

Thank you.

1 Like