project task creation issue
This commit is contained in:
parent
fa3833bac3
commit
6a32ac3f37
|
|
@ -227,10 +227,10 @@ class projectTask(models.Model):
|
|||
|
||||
@api.onchange('user_ids')
|
||||
def _onchange_user_ids(self):
|
||||
if self.project_id and self.project_id.user_id:
|
||||
if self.project_id.user_id.id != self.env.user.id:
|
||||
if self.project_id and (self.project_id.user_id or self.project_id.project_lead):
|
||||
if (self.project_id.user_id.id != self.env.user.id) and (self.project_id.project_lead.id != self.env.user.id):
|
||||
raise ValidationError(
|
||||
"Only Project Manager can assign/remove assignees"
|
||||
"Only Project Manager/Lead can assign/remove assignees"
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue