From 3b40a324d60e3f427c5e7663eab2ec6a7fa513ae Mon Sep 17 00:00:00 2001 From: jbm-odoo Date: Mon, 16 Dec 2019 15:47:57 +0000 Subject: [PATCH] [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) --- addons/hr_org_chart/models/hr_org_chart_mixin.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/hr_org_chart/models/hr_org_chart_mixin.py b/addons/hr_org_chart/models/hr_org_chart_mixin.py index e687c51feb0..473fc4294eb 100644 --- a/addons/hr_org_chart/models/hr_org_chart_mixin.py +++ b/addons/hr_org_chart/models/hr_org_chart_mixin.py @@ -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