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
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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 upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
3
Oct 23
|
5977 | ||
|
1
Sep 23
|
1968 | ||
|
1
May 23
|
1004 | ||
|
2
Apr 23
|
1377 | ||
|
1
Mar 23
|
996 |