[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>
This commit is contained in:
Toufik Ben Jaa
2020-07-15 12:42:59 +00:00
parent b3681bc85f
commit 04a757d596
+1 -1
View File
@@ -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")