Doctype_dashboard.py, collapsible

Hello;

How I can let the dashboard appears collapsible? So if the user needs to see the dashboard, he can click on the arrow to open the section (collapsible)?

Regards
Bilal

@bghayad

Currently there is no configuration to set default dashboard collapsible for the user, can you create github issue for this feature request.

Thank you @rohit_w
OK, it is noticed.
What if I need the dashboard to appear only if the document is submitted, how I can achieve this?
Regards
Bilal

@bghayad

You have to create custom script for that doctype and have to write custom code. You can refer following code to hide/show dashboard

frappe.ui.form.on('Sales Order', {
	refresh: function(frm) {
		frm.dashboard.show();
		if(frm.doc.docstatus == 0) {
			frm.dashboard.hide();
		}
	}
})

4 Likes