From 04a757d59615c622ba808e4d5b0efc0ecf3190d0 Mon Sep 17 00:00:00 2001 From: Toufik Ben Jaa Date: Wed, 15 Jul 2020 11:08:38 +0000 Subject: [PATCH] [FIX] project: allow non manger to duplicate tasks - The field `allowed_user_ids` is only accessible to Project Manager. When trying to duplicate a task, an access right issue is raised if you are not project manager. This is due to the fact that when trying to duplicate this field is read. To avoid this issue, we specify that this field should be copied thus not be read. closes odoo/odoo#54509 X-original-commit: 95dedd23cc7a7d66d7a7dc17b9f9ac4f5473e226 Signed-off-by: Yannick Tivisse (yti) Signed-off-by: Toufik Benjaa (tbe) --- addons/project/models/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project/models/project.py b/addons/project/models/project.py index 2355eba348f..6509cac3e25 100644 --- a/addons/project/models/project.py +++ b/addons/project/models/project.py @@ -593,7 +593,7 @@ class Task(models.Model): subtask_count = fields.Integer("Sub-task count", compute='_compute_subtask_count') email_from = fields.Char(string='Email From', help="These people will receive email.", index=True, compute='_compute_email_from', store="True", readonly=False) - allowed_user_ids = fields.Many2many('res.users', string="Visible to", groups='project.group_project_manager', compute='_compute_allowed_user_ids', store=True, readonly=False) + allowed_user_ids = fields.Many2many('res.users', string="Visible to", groups='project.group_project_manager', compute='_compute_allowed_user_ids', store=True, readonly=False, copy=False) project_privacy_visibility = fields.Selection(related='project_id.privacy_visibility', string="Project Visibility") # Computed field about working time elapsed between record creation and assignation/closing. working_hours_open = fields.Float(compute='_compute_elapsed', string='Working hours to assign', store=True, group_operator="avg")