14.0 project default assignees #15

Merged
LaetitiaElabore merged 3 commits from 14.0-project_default_assignees into 14.0-allow_assigned_portal_users 2023-11-21 15:44:24 +00:00
Showing only changes of commit 24ddccecfd - Show all commits

View File

@@ -16,5 +16,5 @@ class Task(models.Model):
project_id = vals.get('project_id', [])
if project_id and assignee_ids and not assignee_ids[0][2]:
project = self.env['project.project'].browse(project_id)
assignee_ids[0][2] = str(project.user_id.id)
if project and project.user_id: assignee_ids[0][2] = str(project.user_id.id)
return super().create(vals)