In nested doctypes search and advanced search shows id instead of title

I’m creating custom doctypes and I have the same problem in several occasions. Example:

Doctype: Units

  • Code (data)
  • Unit_name (data), in preview, in list view, in list filter, in filter
    title field: Unit_name

Doctype: Parameter Pitch

  • value (float)
  • pitch_units (link → Units) , in preview, in list view, in list filter, in filter
    title field: value
    search fields: pitch_units

Doctype: Product

  • pitch(link → Parameter Pitch)

When I select Units from Parameter Pitch I can see the Unit_name field in the seleccion list.
When I select one Parameter Pitch from Product I can’t see the Unit_name for selection neither in the advanced search option. Instead I see the Units ID .

How can I solve this or what’s wrong?