From e89eff40bbaa65079b660013d9136cfe1afda0bd Mon Sep 17 00:00:00 2001 From: "Laurent Stukkens (LTU)" Date: Wed, 1 Dec 2021 12:36:09 +0000 Subject: [PATCH] [FIX] project: prevent archived assignees from not being visible Prior to this fix: - Archived users are no more shown in the assignees After this commit: - All users, including archived ones will be shown in the assignees. task-2703358 closes odoo/odoo#80783 X-original-commit: d6092e318e04619313851276865b333afd264aad Related: odoo/enterprise#22689 Signed-off-by: Xavier Signed-off-by: Laurent Stukkens (ltu) --- addons/project/models/project.py | 2 +- addons/project/views/project_views.xml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/addons/project/models/project.py b/addons/project/models/project.py index 659290d0eef..a4dc67ee9ff 100644 --- a/addons/project/models/project.py +++ b/addons/project/models/project.py @@ -948,7 +948,7 @@ class Task(models.Model): subtask_planned_hours = fields.Float("Sub-tasks Planned Hours", compute='_compute_subtask_planned_hours', help="Sum of the time planned of all the sub-tasks linked to this task. Usually less than or equal to the initially planned time of this task.") # Tracking of this field is done in the write function - user_ids = fields.Many2many('res.users', relation='project_task_user_rel', column1='task_id', column2='user_id', string='Assignees') + user_ids = fields.Many2many('res.users', relation='project_task_user_rel', column1='task_id', column2='user_id', string='Assignees', context={'active_test': False}) # User names displayed in project sharing views portal_user_names = fields.Char(compute='_compute_portal_user_names', compute_sudo=True, search='_search_portal_user_names') # Second Many2many containing the actual personal stage for the current user diff --git a/addons/project/views/project_views.xml b/addons/project/views/project_views.xml index 35f0b1b48f6..5f1d0056f11 100644 --- a/addons/project/views/project_views.xml +++ b/addons/project/views/project_views.xml @@ -18,7 +18,7 @@ - + @@ -929,7 +929,7 @@ class="o_task_user_field" options="{'no_open': True}" widget="many2many_avatar_user" - domain="[('share', '=', False)]"/> + domain="[('share', '=', False), ('active', '=', True)]"/> @@ -959,7 +959,7 @@ - + @@ -976,7 +976,7 @@ - + @@ -1088,7 +1088,7 @@
- @@ -1218,7 +1218,7 @@ - +