Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
4213 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
ott 23
1262
3
apr 20
3455
1
feb 20
2188
4
mar 15
7562
1
lug 25
325