title_links icon indicating copy to clipboard operation
title_links copied to clipboard

Frappe Hack: Links using related title, instead of name

Title Links

In some cases, we need hide the standard name of a DocType in favor of another value in the doctype, and get it simple to the end user.

Title Links, do exactly it, it replace the value displayed in the Links and Dynamic Links fields, to the value of the title field, defined in your DocTypes.

When the title is not present, we will ensure the same behavior of the original widgets of frappe, displaying the name.

That is how the normal behavior of Link Widget looks like:

schermata 2017-02-08 alle 13 31 23

This is how the related record looks like in frappe

schermata 2017-02-08 alle 12 49 27

Frappe, already replace the title value in the visualization area of the Form, and show the original name, in the right side of the form, as a small text. Why we can't do the same to the links?

To me it's by designe is not enought, so I decided to hack frappe.

After install this app, and configure the DocTypes that you need to change to title, like the below image,

schermata 2017-02-08 alle 12 34 19

Your links will look like

schermata 2017-02-08 alle 17 00 56

A selected value will look like

schermata-2017-02-08-alle-18 46 33

Don't worry with Link Formatters, title links already define it to you!

schermata-2017-02-08-alle-18 31 28

License

MIT