diff options
| author | Toufik Ben Jaa <tbe@odoo.com> | 2019-05-22 13:57:29 +0000 |
|---|---|---|
| committer | Toufik Ben Jaa <tbe@odoo.com> | 2019-05-22 13:57:29 +0000 |
| commit | 86f8be14661dc028742cad0cfa37405768d4673b (patch) | |
| tree | 475e755903ba63b4c8a801b1e29365b6f8f6c720 /addons/hr_org_chart/controllers | |
| parent | 1f70d53e5a8ab96b26f2dc8eeeee5eda47f07721 (diff) | |
[FIX] hr_org_chart: multicompany managers trigger access right issues
- When displaying the organisational chart an access right error can be
triggered if the current user cannot read employees from other
companies and if one of the displayed employee's manager is in an other
company.
closes odoo/odoo#33576
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
Diffstat (limited to 'addons/hr_org_chart/controllers')
| -rw-r--r-- | addons/hr_org_chart/controllers/hr_org_chart.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/hr_org_chart/controllers/hr_org_chart.py b/addons/hr_org_chart/controllers/hr_org_chart.py index 20f1c30047a..8b60bff0c7e 100644 --- a/addons/hr_org_chart/controllers/hr_org_chart.py +++ b/addons/hr_org_chart/controllers/hr_org_chart.py @@ -45,7 +45,7 @@ class HrOrgChartController(http.Controller): return {} # compute employee data for org chart - ancestors, current = request.env['hr.employee'], employee + ancestors, current = request.env['hr.employee'].sudo(), employee.sudo() while current.parent_id and len(ancestors) < self._managers_level+1: ancestors += current.parent_id current = current.parent_id |
