I am wondering how to disable listview for particular doctypes (let say B,C,D).
They are added dynamically from other doctype (let say A) and should be accessed only from this instance?
If it is not possible easy way please point me so that I can implement it.
I have a trick to avoid seeing the ListView of a particular DocType.
To do that you can override the before_render trigger with frappe.set_route() like the example below:
frappe.listview_settings['Your Doc'] = {
before_render() {
// triggers before every render of list records
frappe.set_route() // redirect to home
},
}