コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
4240 ビュー

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.

アバター
破棄
最善の回答

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"

アバター
破棄
関連投稿 返信 ビュー 活動
0
10月 23
1268
3
4月 20
3489
1
2月 20
2200
4
3月 15
7569
1
7月 25
335