Hi, I am using odoo11.
I have two models. The first model inherits from res.partner and has a custom field "code". The other model is a new one built from scratch (let's call it model_X), and has a many2one field referring to res.partner.
By default, in my form view for model_X, the dropdown related to the many2one field displays the description of the partner. I would like the "code" field to be displayed instead.
Is that possible? Thank you as always.
Daniele
See this, using name_get function: https://www.youtube.com/watch?v=-1r3WSwtqxQ
Search and Display Multiple Fields on Product Many2one (Quotation, SO, PO MO etc) Field
This module allows you to search and display multiple fields in the Product Many2one field across all Odoo screens - such as quotations, sale orders, purchase orders, invoices, and more.
https://apps.odoo.com/apps/modules/17.0/mh_products_search_and_display_multiple_field