Files
odoo_source/addons/hr_org_chart/models/hr_employee.py
T
Swapnesh Shah 5fef9d27d0 [FIX] hr_org_chart: Compute non-stored fields in superuser mode
closes odoo/odoo#39428

X-original-commit: 1f2ff1e93b6fcbf2d6a2153465aa81852cc65816
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-28 11:10:47 +00:00

19 lines
696 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class Employee(models.Model):
_inherit = ["hr.employee"]
subordinate_ids = fields.One2many('hr.employee', string='Subordinates', compute='_compute_subordinates', help="Direct and indirect subordinates",
compute_sudo=True)
class HrEmployeePublic(models.Model):
_inherit = ["hr.employee.public"]
subordinate_ids = fields.One2many('hr.employee.public', string='Subordinates', compute='_compute_subordinates', help="Direct and indirect subordinates",
compute_sudo=True)