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

Hi everybody,

I would like to be able to Open a kanban form with a button.

My Kanban is the project.task one.

I tried the code below but I got this error:


View error
Can't find field 'stage_id' in the following view parts composing the view of object model 'project.task':
* project.task.kanban


Someone has an idea about my problem? It will be great ;-)

Thank you a lot!

Selverine

PS: This is my code:

 def action_view_tasks(self, cr, uid, ids, context=None):
        #pdb.set_trace()
view_ref = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'project', 'view_task_kanban')
view_id = view_ref and view_ref[1] or False,
this = self.browse(cr, uid, ids, context=context)[0]
return {
'type': 'ir.actions.act_window',
'name': 'Form heading',
'view_mode': 'form',
'view_type': 'form',
'view_id': view_id,
'res_model': 'project.project',
'nodestroy': True,
'res_id': this.id, 
'target':'new',
'context': context}


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 2 22
2804
1
thg 8 16
5105
2
thg 7 16
3417
1
thg 9 20
3345
1
thg 12 15
6015