Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
3640 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
1
oct. 15
8281
0
août 22
2232
3
juil. 18
5271
0
mars 15
6703
1
juin 23
3371