Dear support,
I wonder if is possible open Gantt view from an specific project with button?
I have implemented a button in project.project model as follow, but it allways open with view_type = kanban
def open_gantt_pro(self):
action = self.env.ref('project.act_project_project_2_project_task_all').read()[0]
action.update({
'view_mode': 'BryntumGantt',
'view_type': 'BryntumGantt',
'res_model': 'project.task',
'target': 'current',
'context': {'active_id': self.id},
})
return action
Thanks
Milton