Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
3610 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
ott 15
8267
0
ago 22
2221
3
lug 18
5260
0
mar 15
6691
1
giu 23
3362