Hi,
So I decided to try to create a button that will open my view.
I would like to open a view with the Kanban that I can find under Project/My tasks.
I have this error when I press the button:
View error
Can't find field 'stage_id' in the following view parts composing the view of object model 'project.task':
* project.task.kanban
Any idea about what is wrong inside my python code?
Thank you a lot,
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}