This commit introduces a new widget specific to employees. It is used to display an org chart centered on the current displayed employee. Two levels of managers as well as subordinates are displayed. It is contained in its own module and its installation is available from hr settings. Thanks to Stefano Rigano <sri@odoo.com> (@stefanorigano) for design and UX implementation.
17 lines
539 B
Python
17 lines
539 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
from odoo import fields, models
|
|
|
|
|
|
class HrConfigurator(models.TransientModel):
|
|
_name = 'hr.config.settings'
|
|
_inherit = 'res.config.settings'
|
|
|
|
company_id = fields.Many2one(
|
|
'res.company', 'Company',
|
|
default=lambda self: self.env.user.company_id, required=True)
|
|
resource_calendar_id = fields.Many2one(
|
|
'resource.calendar', 'Company Working Hours',
|
|
related='company_id.resource_calendar_id')
|
|
module_hr_org_chart = fields.Boolean(string="Show Organizational Chart")
|