[FIX] project: open the Tasks Analysis and customer rating report in project burger menu
task-3345839 closes odoo/odoo#125551 X-original-commit: e27cb2181a899a6573df0ac6ecb0cf1ba05fd2c2 Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit is contained in:
@@ -611,7 +611,7 @@ class Project(models.Model):
|
||||
def action_view_all_rating(self):
|
||||
""" return the action to see all the rating of the project and activate default filters"""
|
||||
action = self.env['ir.actions.act_window']._for_xml_id('project.rating_rating_action_view_project_rating')
|
||||
action['display_name'] = _("%(name)s's Rating", name=self.name),
|
||||
action['display_name'] = _("%(name)s's Rating", name=self.name)
|
||||
action_context = ast.literal_eval(action['context']) if action['context'] else {}
|
||||
action_context.update(self._context)
|
||||
action_context['search_default_rating_last_30_days'] = 1
|
||||
@@ -628,7 +628,7 @@ class Project(models.Model):
|
||||
def action_view_tasks_analysis(self):
|
||||
""" return the action to see the tasks analysis report of the project """
|
||||
action = self.env['ir.actions.act_window']._for_xml_id('project.action_project_task_user_tree')
|
||||
action['display_name'] = _("%(name)s's Tasks Analysis", name=self.name),
|
||||
action['display_name'] = _("%(name)s's Tasks Analysis", name=self.name)
|
||||
action_context = ast.literal_eval(action['context']) if action['context'] else {}
|
||||
action_context['search_default_project_id'] = self.id
|
||||
return dict(action, context=action_context)
|
||||
|
||||
Reference in New Issue
Block a user