How to override list_view.js file using custom app

Hello Community,

I am trying to override the list_view.js file through the custom app but as mentioned in the documentation, the file is not getting overridden. So is there any different way to override that file or is it the same way? If anyone has tried it, please help me with it.

Here is the file path.
File Path :- apps>frappe>frappe>public>js>frappe>list>list_view.js

Thanks in advance.

Please mention the doctype and path in hooks.py

Thanks For your reply but I want to use the same code in the list view for all doctypes. So how can I override the code using a custom app and hooks.py? Your answer is correct but it’s just for one doctype. I want to override the code because I want to change the layout and color of the system so please guide me.

Have a look in to this List