Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4127 Lượt xem

I want to add the effective_hours in crm.helpdesk model. How can I do that?

I have made a field like this: with this field I select the right task.


'task_helpdesk': fields.many2one('project.task', 'task_id', select=True),

Now everytime the "effective_hours" from this task_id changes. It should display in crm.helpdesk model.

How can I make that ?


Thank you


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Okay, task_helpdesk field in crm.helpdesk model and you want to add effective_hours field in task_helpdesk model.

You can make fields.related

Ex.

'effective_hours':fields.related('task_helpdesk','effective_hours',type='float',string="Effective Hours"),

I hope this is helpfull for you.


Ảnh đại diện
Huỷ bỏ
Tác giả

wow, I tried this way x times, but your solution works. I need to check what I've done wrong with that, THANK YOU

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 2 23
2006
Database Odoo Đã xử lý
1
thg 3 18
3646
1
thg 5 17
2993
1
thg 1 16
2988
2
thg 10 15
6661