Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
4176 Widoki

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.

Awatar
Odrzuć
Najlepsza odpowiedź

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"

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
paź 23
1235
3
kwi 20
3434
1
lut 20
2126
4
mar 15
7528
1
lip 25
268