2019-06-11 21:34:10 +00:00
|
|
|
from odoo import models, fields, api
|
|
|
|
|
|
|
|
|
|
|
|
class ProjectProject(models.Model):
|
|
|
|
_inherit = "project.project"
|
|
|
|
|
2019-06-12 16:44:10 +00:00
|
|
|
@api.multi
|
2019-06-11 21:34:10 +00:00
|
|
|
def open_timesheets_matrix(self):
|
|
|
|
wiz = self.env['project.timesheet.matrix.wiz'].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,
|
|
|
|
}
|