From 1d908a14ebef98f06467515a386deb27ee728cd4 Mon Sep 17 00:00:00 2001 From: Aktiv Software Date: Mon, 15 Nov 2021 15:32:13 +0000 Subject: [PATCH] [FIX] project: remove gantt and map views from project.task actions Prior to this commit: * The `action_dependent_tasks` and `action_recurring_tasks` were wrongly returning a view_mode containing the gantt and map views, which are part of enterprise. After this commit: * The `action_dependent_tasks` and `action_recurring_tasks` will return a community valid view_mode. closes #79785 Related to issue https://github.com/odoo/odoo/issues/79555 X-original-commit: c2e1a3133e2a9cff2db8ceb86d242930e17480e2 Part-of: odoo/odoo#79797 --- addons/project/models/project.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/project/models/project.py b/addons/project/models/project.py index 0e32155746c..d208cd8552e 100644 --- a/addons/project/models/project.py +++ b/addons/project/models/project.py @@ -2096,7 +2096,7 @@ class Task(models.Model): action['res_id'] = self.dependent_ids.id else: action['name'] = _('Dependent Tasks') - action['view_mode'] = 'tree,form,kanban,calendar,pivot,graph,gantt,activity,map' + action['view_mode'] = 'tree,form,kanban,calendar,pivot,graph,activity' action['domain'] = [('depend_on_ids', '=', self.id)] return action @@ -2105,7 +2105,7 @@ class Task(models.Model): 'name': 'Tasks in Recurrence', 'type': 'ir.actions.act_window', 'res_model': 'project.task', - 'view_mode': 'tree,form,kanban,calendar,pivot,graph,gantt,activity,map', + 'view_mode': 'tree,form,kanban,calendar,pivot,graph,activity', 'context': {'create': False}, 'domain': [('recurrence_id', 'in', self.recurrence_id.ids)], }