summaryrefslogtreecommitdiff
path: root/addons/project/models
diff options
context:
space:
mode:
authorToufik Ben Jaa <tbe@odoo.com>2020-07-15 11:08:38 +0000
committerToufik Ben Jaa <tbe@odoo.com>2020-07-15 12:42:59 +0000
commit04a757d59615c622ba808e4d5b0efc0ecf3190d0 (patch)
treec6fab770ddae9702861335fcd285319d252c6521 /addons/project/models
parentb3681bc85f44e68c46bee31fcadf8d9850029d4a (diff)
[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) <yti@odoo.com> Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
Diffstat (limited to 'addons/project/models')
-rw-r--r--addons/project/models/project.py2
1 files changed, 1 insertions, 1 deletions
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")