From 577bdbcd8784a194f7d23d1dbcd6859f70251596 Mon Sep 17 00:00:00 2001 From: Panagiotis Kyriakou Date: Tue, 23 May 2023 06:21:49 +0000 Subject: [PATCH] [FIX] project: revert current stage notification This commit reverts a previous commit which allowed to display the current stage when the state is changed. The reverted PR: https://github.com/odoo/odoo/pull/119925 The reversion was done as what was implemented does not follow the standard display of tracking messages and because it doesn't look good in the chatter. Task-3336184 closes odoo/odoo#123797 X-original-commit: eff511140175ba8224c2f9be59a798a3e1dee6da Signed-off-by: Xavier Bol (xbo) --- addons/project/i18n/project.pot | 8 -------- addons/project/models/project_task.py | 10 ---------- 2 files changed, 18 deletions(-) diff --git a/addons/project/i18n/project.pot b/addons/project/i18n/project.pot index eb35e80e33e..c3388f7ccea 100644 --- a/addons/project/i18n/project.pot +++ b/addons/project/i18n/project.pot @@ -1338,14 +1338,6 @@ msgstr "" msgid "Currency" msgstr "" -#. module: project -#. odoo-python -#: code:addons/project/models/project_task.py:0 -#: code:addons/project/models/project_task.py:0 -#, python-format -msgid "Current Stage: %s" -msgstr "" - #. module: project #: model_terms:ir.ui.view,arch_db:project.portal_tasks_list msgid "Current project of the task" diff --git a/addons/project/models/project_task.py b/addons/project/models/project_task.py index 931c46637d8..ae695891b31 100644 --- a/addons/project/models/project_task.py +++ b/addons/project/models/project_task.py @@ -1018,16 +1018,6 @@ class Task(models.Model): task.state = '04_waiting_normal' if vals['state'] in CLOSED_STATES: task.date_last_stage_update = now - if "stage_id" not in vals: - if len(self) > 1: - task_ids_per_stage = defaultdict(list) - for task in self: - task_ids_per_stage[task.stage_id].append(task.id) - for stage, task_ids in task_ids_per_stage.items(): - tasks = self.browse(task_ids) - tasks._track_set_log_message(_lt("Current Stage: %s", stage.name)) - else: - self._track_set_log_message(_("Current Stage: %s", self.stage_id.name)) self._task_message_auto_subscribe_notify({task: task.user_ids - old_user_ids[task] - self.env.user for task in self}) return result