[FIX] sale_timesheet: lost breadcrumb
On a SO, click on the stat button "Project". It opens the form view of the corresponding project, but the breadcrumb is lost. opw-705193
This commit is contained in:
@@ -96,20 +96,14 @@ class SaleOrder(models.Model):
|
||||
@api.multi
|
||||
def action_view_project_project(self):
|
||||
self.ensure_one()
|
||||
action = self.env.ref('project.open_view_project_all')
|
||||
action = self.env.ref('project.open_view_project_all').read()[0]
|
||||
form_view_id = self.env.ref('project.edit_project').id
|
||||
|
||||
result = {
|
||||
'name': action.name,
|
||||
'help': action.help,
|
||||
'type': action.type,
|
||||
'views': [(form_view_id, 'form')],
|
||||
'target': action.target,
|
||||
'context': action.context,
|
||||
'res_model': action.res_model,
|
||||
'res_id': self.project_project_id.id,
|
||||
}
|
||||
return result
|
||||
action['views'] = [(form_view_id, 'form')]
|
||||
action['res_id'] = self.project_project_id.id
|
||||
action.pop('target', None)
|
||||
|
||||
return action
|
||||
|
||||
@api.multi
|
||||
def action_view_timesheet(self):
|
||||
|
||||
Reference in New Issue
Block a user