Dashboard.py information available?

Hi all,

I tried to find some in-depth information on how to create a dashboard.py file for doctypes in custom apps. I could find some basic info and youtube videos on this topic. However, no in-depth tutorial.

Anybody here has a link or something for me?


You can add Linked Documents in custom doctype, the dashboard will be created automatically with links defined.it can be done by dashboard.py but this is possible through GUI

see this link how to create linked documents


Thanks for your response. I know that link.

I want to use the dashboard with links in child tables.

I mentioned my specific problem here:


Is there a solution for links in child tables?


Do you mean the dashboard of the doctype just like the Item doctype dashboard ?
If so, then you could take a look at the Item doctype source . There is a file “item_dashboard.py” there and it’s a kind of definition only and frappe will do the rest as long as the link is correct.

I’ve done this modification many times in doctype dashboard and indeed it’s quite easy.

Thanks kocrotus,

that is the kind of information I was looking for. Do you know if there is some kind of tutorial on this?

Best regards,

I think there is no tutorial for this.
All I did was just try to do experiment on the Item doctype dashboard and apply the mechanism on my own doctype.

Item doctype dashboard is a working example how to do this. We just need to define the field and reference to what doctype.

There is an easier format as a start. Try check the dashboard of the Batch doctype => https://github.com/frappe/erpnext/tree/develop/erpnext/stock/doctype/batch . The file is “batch_dashboard.py”

Thanks for pointing me to that example. I will try where it gets me!

Hey, could you solve it?

Kind regards