[ADD] create project_task_assignees_avatar
This commit is contained in:
committed by
Stéphan Sainléger
parent
d621f2d2ea
commit
ea5540c1b6
13
project_task_assignees_avatar/models/project_task.py
Normal file
13
project_task_assignees_avatar/models/project_task.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from odoo import models, fields, api
|
||||
|
||||
|
||||
class Task(models.Model):
|
||||
_inherit = 'project.task'
|
||||
|
||||
first_assignee_id = fields.Many2one('res.users', string='First Assignee', compute='_compute_first_assignee')
|
||||
|
||||
@api.depends('assignee_ids')
|
||||
def _compute_first_assignee(self):
|
||||
for record in self:
|
||||
record.first_assignee_id = record.assignee_ids[:1].id if record.assignee_ids else False
|
||||
|
Reference in New Issue
Block a user