This question has been flagged
4 Replies
17650 Views


Avatar
Discard

This Video show you how to define and use the rec_name in odoo: https://www.youtube.com/watch?v=d_cyPsVc7vg

Best Answer

Hi MouBou

_rec_name is intended to define the record value used to display it in search for many2one and others cases. By default it is assumed by convention that you have a field named 'name' in your model. This is used in methods like name_get and name_search of the ORM. 

You usually define it on models that do not contains a field named 'name'

Avatar
Discard

Or on models where you want to show another value by default than the name. Accepted the answer. :)

Best Answer

It is a unique recognizer for your relational table's record(mainly M2O), mandatory for tables where there is no 'name' field, and functionally important when you want a special pattern to recognise your record (like Product, Address, Full name).

Avatar
Discard