Odoo Help


Select field to show relation

Luis Domingues
on 4/12/13, 6:57 AM 1,011 views


I have a class "task" with one field "taskname".

    'taskname':fields.char('Task',size= 32 ,required=True),

I have also a relation to the task.

    'task_id':fields.many2one('gestion.tasks', 'Task', readonly=False, relate=True),

But in the view I have "model,id" and not the task name.

How can I show the taskname and not the ID in my view?




| 5 4 8
Casablanca, Morocco
On 4/12/13, 7:09 AM

You have 2 possibilities:

1- Rename the taskname field by name

2- Add the _rec_name attribute to your class like this: _rec_name: "taskname"

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 4/12/13, 6:57 AM
Seen: 1011 times
Last updated: 3/16/15, 8:10 AM