Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3668 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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)]}
                }

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 10 15
8326
0
thg 8 22
2261
3
thg 7 18
5311
0
thg 3 15
6739
1
thg 6 23
3410