İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
4198 Görünümler

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
Vazgeç
En İyi Yanıt

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
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
0
Eki 23
1247
3
Nis 20
3443
1
Şub 20
2176
4
Mar 15
7546
1
Tem 25
289