[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 <xbo@odoo.com>
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<search string="Tasks">
|
||||
<field name="name" string="Task"/>
|
||||
<field name="tag_ids"/>
|
||||
<field name="user_ids"/>
|
||||
<field name="user_ids" context="{'active_test': False}"/>
|
||||
<field string="Project" name="display_project_id"/>
|
||||
<field name="stage_id"/>
|
||||
<field name="partner_id" operator="child_of"/>
|
||||
@@ -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)]"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="active" invisible="1"/>
|
||||
@@ -959,7 +959,7 @@
|
||||
<field name="name"/>
|
||||
<field name="display_project_id" string="Project" optional="hide"/>
|
||||
<field name="partner_id" optional="hide"/>
|
||||
<field name="user_ids" widget="many2many_avatar_user" optional="show"/>
|
||||
<field name="user_ids" widget="many2many_avatar_user" optional="show" domain="[('active', '=', True)]"/>
|
||||
<field name="company_id" groups="base.group_multi_company" optional="hide"/>
|
||||
<field name="activity_ids" widget="list_activity" optional="hide"/>
|
||||
<field name="date_deadline" attrs="{'invisible': [('is_closed', '=', True)]}" optional="show"/>
|
||||
@@ -976,7 +976,7 @@
|
||||
<field name="is_closed" invisible="1" />
|
||||
<field name="name" />
|
||||
<field name="project_id" optional="hide" />
|
||||
<field name="user_ids" widget="many2many_avatar_user" optional="show"/>
|
||||
<field name="user_ids" widget="many2many_avatar_user" optional="show" domain="[('active', '=', True)]"/>
|
||||
<field name="company_id" optional="hide" groups="base.group_multi_company" />
|
||||
<field name="activity_ids" widget="list_activity" optional="hide"/>
|
||||
<field name="date_deadline" attrs="{'invisible': [('is_closed', '=', True)]}" optional="show" />
|
||||
@@ -1088,7 +1088,7 @@
|
||||
<form>
|
||||
<group>
|
||||
<field name="name" string = "Task Title" placeholder="e.g. New Design"/>
|
||||
<field name="user_ids" options="{'no_open': True,'no_create': True}" domain="[('share', '=', False)]"
|
||||
<field name="user_ids" options="{'no_open': True,'no_create': True}" domain="[('share', '=', False), ('active', '=', True)]"
|
||||
widget="many2many_tags"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="parent_id" invisible="1" groups="base.group_no_one"/>
|
||||
@@ -1218,7 +1218,7 @@
|
||||
<field name="project_id" widget="project_private_task" optional="show" readonly="1"/>
|
||||
<field name="partner_id" optional="hide"/>
|
||||
<field name="parent_id" optional="hide" attrs="{'invisible': [('allow_subtasks', '=', False)]}" groups="base.group_no_one"/>
|
||||
<field name="user_ids" optional="show" widget="many2many_avatar_user"/>
|
||||
<field name="user_ids" optional="show" widget="many2many_avatar_user" domain="[('active', '=', True)]"/>
|
||||
<field name="company_id" groups="base.group_multi_company" optional="show"/>
|
||||
<field name="activity_ids" widget="list_activity" optional="show"/>
|
||||
<field name="date_deadline" optional="hide" widget="remaining_days" attrs="{'invisible': [('is_closed', '=', True)]}"/>
|
||||
|
||||
Reference in New Issue
Block a user