I have a custom app which is installed in a site,
Under my app’s hooks.py
file I added:
doctype_list_js = {
"Warranty Claim": [
"assets/myapp/images/js/warranty_claim_list.js"
]
}
I then uploaded the warranty_claim_list.js
file in /frappe-bench/apps/myapp/myapp/public/js/
which contains:
frappe.listview_settings['Warranty Claim'] = {
add_fields: ["status", "customer", "item_code"],
filters:[["customer","=", "Closed"]]
};
I ran sudo supervisorctl reload and refreshed my Warranty Claim list but there are no changes.
To be honest this is my first time using hooks, so I am not sure what I am doing wrong. Is there something else that I need to do?
I’ve even tried some other hooks for testing:
website_context = {
"splash_image": "assets/myapp/images/splash.png"
}
But none of it works… Changing my app details e.g. app_version etc. does reflect though.
FYI, I do clear the cache every time I retry.
Any help is appreciated.