Need to know where 'Related Documents' Link code lies.?

I need to add more links in Purchase Receipt,
So, wanted to know the location of its .py file

can you please share details ?

if you want to add the fields then use either customize form or custom field where you can add the link fields.

Thanks, Makarand

No not fields… i need to add links on dashboard

Just need to know where does the sql query for this related document link lies.

@Varna,

check,

Thanks, Makarand

Thanks @makarand_b for giving the links but please can u explain what is ‘non_standard_fieldnames’ & ‘internal_links’
So that even i can add new related documents links

@Varna,

non_standard_fieldnames and internal_links both are used for filtering.

please check the https://github.com/frappe/frappe/blob/develop/frappe/public/js/frappe/form/dashboard.js#L220 for non_standard_fieldnames

and, https://github.com/frappe/frappe/blob/develop/frappe/public/js/frappe/form/dashboard.js#L200 for internal_links

Thanks, Makarand

I m really sorry for disturbing you but i m still not getting it @makarand_b
Just tell me what should i do if i need to add Journal Entry as ‘Related Documents’ in Purchase Order.
As we make JE against PO so i need to link it.