From 1979e2671f49cc56ed67e18f375df2544ae6f44a Mon Sep 17 00:00:00 2001 From: "Victor Piryns (pivi)" Date: Wed, 26 Apr 2023 12:45:10 +0000 Subject: [PATCH] [FIX] project: remove "I take it" from task following email header Current behaviour: On a brand new task with no assignees, when we add an user to follow the task with an email, there is a link "I take it" that is supposed to assign the newly following user as the assignee of the task. This link is dead, returning a 404. Expected behaviour: Either correct the link, or remove it from the email header. Steps to reproduce: - Install Project - Create a task, with no assignees - Add a new follower to the task with Send Email checked. - Check the outgoing email, and click on the link "I take it". - 404 response Reason for the problem: The route which we were using for this `/mail/assign` doesn't exist anymore since version 15. This was an intended design change, to remove noice. The user can click on "See task" and assign himself on there. Fix: Remove the "I take it" link from the email header. Affected versions: - 15.0 - saas-15.2 - 16.0 - saas-16.1 - saas-16.2 - master opw-3276036 closes odoo/odoo#119920 X-original-commit: 2d3134381c23675199bd8e14fafb1804d54339e6 Signed-off-by: Xavier Bol (xbo) Signed-off-by: Piryns Victor (pivi) --- addons/project/i18n/project.pot | 6 ------ addons/project/models/project_task.py | 5 ----- 2 files changed, 11 deletions(-) diff --git a/addons/project/i18n/project.pot b/addons/project/i18n/project.pot index eb2b494a6d0..d1611586224 100644 --- a/addons/project/i18n/project.pot +++ b/addons/project/i18n/project.pot @@ -2265,12 +2265,6 @@ msgstr "" msgid "How’s this project going?" msgstr "" -#. module: project -#. odoo-python -#: code:addons/project/models/project.py:0 -#, python-format -msgid "I take it" -msgstr "" #. module: project #: model:ir.model.fields,field_description:project.field_project_collaborator__id diff --git a/addons/project/models/project_task.py b/addons/project/models/project_task.py index 0f9156c9ee0..be0f7c788c2 100644 --- a/addons/project/models/project_task.py +++ b/addons/project/models/project_task.py @@ -1222,15 +1222,10 @@ class Task(models.Model): if not self: return groups - local_msg_vals = dict(msg_vals or {}) self.ensure_one() project_user_group_id = self.env.ref('project.group_project_user').id new_group = ('group_project_user', lambda pdata: pdata['type'] == 'user' and project_user_group_id in pdata['groups'], {}) - if not self.user_ids and not self.is_closed: - take_action = self._notify_get_action_link('assign', **local_msg_vals) - project_actions = [{'url': take_action, 'title': _('Assign to me')}] - new_group[2]['actions'] = project_actions groups = [new_group] + groups if self.project_privacy_visibility == 'portal':