ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Doctype Dashboard Adding Related Items


#1

Hello @bananayoyo @hairuni , i want to link my Job Cards to the Maintenance Requests Doctype dashboard. Note that Job Cards are made from Maintenance Request, see attached image below.
Here is my code for the maintenance_request_dashboard.py

from frappe import _

def get_data():
return {
‘fieldname’: ‘maintenance_request’,
‘transactions’: [
{
‘label’: _(‘Related’),
‘items’: [‘Job Card’,]
},
]
}