تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
4197 أدوات العرض

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
أكتوبر 23
1247
3
أبريل 20
3443
1
فبراير 20
2173
4
مارس 15
7546
1
يوليو 25
289