from odoo import models, fields, api class ProjectProject(models.Model): _inherit = "project.project" @api.multi def open_timesheets_matrix(self): wiz = self.env['project.timesheet.matrix.wiz'].with_context(project_id=self.id).create({}) return { 'name': 'Edit timesheets', 'type': 'ir.actions.act_window', 'view_type': 'form', 'view_mode': 'form', 'res_model': 'project.timesheet.matrix.wiz', 'target': 'new', 'res_id': wiz.id, 'context': self.env.context, }