[FIX] hr_org_chart: Avoid write on employee just by loading the view
Before this commit: When loading a employee form, a write is done due to hr_org_chart After this commit: No write should be performed closes odoo/odoo#42214 Taskid: 2150314 X-original-commit: 6e150ee19bb1f42c14d13218114ae9afbb84ebf4 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
@@ -28,7 +28,6 @@ class HrEmployeeBase(models.AbstractModel):
|
||||
direct_subordinates = self.child_ids - parents
|
||||
for child in direct_subordinates:
|
||||
child_subordinate = child._get_subordinates(parents=parents)
|
||||
child.subordinate_ids = child_subordinate
|
||||
indirect_subordinates |= child_subordinate
|
||||
return indirect_subordinates | direct_subordinates
|
||||
|
||||
|
||||
Reference in New Issue
Block a user