Hello,
I need to get the department and manager of the employee directly after selecting an employee's name
Thank you in advance for any help
Hello,
I need to get the department and manager of the employee directly after selecting an employee's name
Thank you in advance for any help
Hi jenan soliman,
You can use 'related' to achieve this.
employee_id = fields.Many2one('hr.employee', string='Employee',required=True)
department = fields.Many2one('hr.department', string='Department', related='employee_id.department_id')
parent_id = fields.Many2one('hr.employee', string='Manager', related='employee_id.parent_id')
Using Related you can achieve this
department = fields.Many2one('hr.department', string='Department', related='employee_id.department_id')
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up| Related Posts | Replies | Views | Activity | |
|---|---|---|---|---|
|
2
Oct 25
|
2886 | |||
|
3
Oct 23
|
12193 | |||
|
1
Sep 23
|
4811 | |||
|
1
May 23
|
3669 | |||
|
2
Apr 23
|
4462 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.