52 lines
2.6 KiB
Python
52 lines
2.6 KiB
Python
# -*- coding: utf-8 -*-
|
|
#############################################################################
|
|
# A part of OpenHRMS Project <https://www.openhrms.com>
|
|
#
|
|
# Cybrosys Technologies Pvt. Ltd.
|
|
#
|
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
|
|
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
|
|
#
|
|
# You can modify it under the terms of the GNU LESSER
|
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
|
|
#
|
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
|
|
# (LGPL v3) along with this program.
|
|
# If not, see <http://www.gnu.org/licenses/>.
|
|
#
|
|
#############################################################################
|
|
from odoo import fields, models
|
|
|
|
|
|
class ResConfigSettings(models.TransientModel):
|
|
"""Inherited the res_config_settings to add notice_period
|
|
configurations."""
|
|
_inherit = 'res.config.settings'
|
|
|
|
notice_period = fields.Boolean(string='Notice Period',
|
|
help='Enable to configure a notice period'
|
|
' for an employee.',
|
|
config_parameter='hr_resignation.notice_period')
|
|
no_of_days = fields.Integer(string='Notice Period Days',
|
|
help='Set the number of days for the notice'
|
|
' period.',
|
|
config_parameter='hr_resignation.no_of_days')
|
|
emp_it_manager = fields.Many2one('res.users',config_parameter='hr_employee_extended.emp_it_manager', string='Employee IT Manager',
|
|
domain=lambda self: [
|
|
('groups_id', 'in', self.env.ref('base.group_user').id)])
|
|
|
|
emp_finance_manager = fields.Many2one('res.users',config_parameter='hr_employee_extended.emp_finance_manager', string='Employee Finance Manager',
|
|
domain=lambda self: [
|
|
('groups_id', 'in', self.env.ref('base.group_user').id)])
|
|
|
|
emp_admin = fields.Many2one('res.users',config_parameter='hr_employee_extended.emp_admin', string='Employee Admin',
|
|
domain=lambda self: [
|
|
('groups_id', 'in', self.env.ref('base.group_user').id)])
|
|
|
|
|