Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
4190 Zobrazení

Hello,

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

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

I have also a relation to the task.

_columns={
    '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?

Thanks.

Avatar
Zrušit
Nejlepší odpověď

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"

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
říj 23
1243
3
dub 20
3437
1
úno 20
2148
4
bře 15
7539
1
čvc 25
279