This question has been flagged
1 Reply
2369 Views

Hello

I have created my own module and would like to use res.partner as the first field so when I click on the entry it will show the module name and then the company name. 

In my class I have "res_partner_id": fields.many2one("res.partner", "Company"), as the first entry but when I create an entry and then open it, the top header looks like this:

Profil / profile.add,8

Is there anyway I can change the profile.add, 8 to show the actually company name?

Is this even possible?

Avatar
Discard
Best Answer

You need to add _rec_name to your module:

_rec_name = 'res_partner_id' 

edit: here is more in-depth explanation:_rec_name - predefined fields

Avatar
Discard
Author

Amazing.. thank you.. so easy when you know how :-)