Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
3654 Prikazi

Hi,
am facing an issue while using project task and timesheet
i assigned task to an employee but while adding timesheet i have option for the selection of multiple employees
can i pass any domain for this.am using odoo 12 community

Thanks in advance

Avatar
Opusti
Best Answer

Hi,

can you try the code below

class TimesheetEmployee(models.Model):
    _inherit = 'account.analytic.line'

    @api.onchange('employee_id')
    @api.depends('employee_id')
    def _onchange_employee_id(self):
        for analytic in self:
            return {'domain':
                {
            'employee_id': [('user_id', '=', analytic.task_id.user_id.id)]}
                }

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
okt. 15
8296
0
avg. 22
2243
3
jul. 18
5285
0
mar. 15
6723
1
jun. 23
3401