Reputation: 195
I got a problem, after saving a record , for view displays model name plus record number . like in the screen shot . i want only record name appear there . thanks in advance
please help , except _rec_name , cause here i get multiples ids from multiple tables
Upvotes: 2
Views: 603
Reputation: 2499
OpenERP/Odoo will call name_get on your model to display this. If you override name_get you can return whatever you want, otherwise it will use the name_get on the BaseModel class.
This will:
The easiest thing to do as Quentin said is have a column called "name" but sometimes it doesn't make sense. For example, in product.supplierinfo the name field is actually the supplier ID - seems like someone was too lazy to do it properly.
Failing that, define a _rec_name field or override name_get yourself but there are a couple of got-chas.
Upvotes: 3