mirror of
https://gitlab.com/sonalarora/tra_backend.git
synced 2025-12-17 18:29:08 +02:00
17 lines
537 B
Python
17 lines
537 B
Python
from odoo.exceptions import Warning
|
|
from odoo import models, fields, api, _
|
|
|
|
|
|
class HrEmployeeContract(models.Model):
|
|
_inherit = 'hr.contract'
|
|
|
|
def _get_default_notice_days(self):
|
|
if self.env['ir.config_parameter'].get_param(
|
|
'hr_resignation.notice_period'):
|
|
return self.env['ir.config_parameter'].get_param(
|
|
'hr_resignation.no_of_days')
|
|
else:
|
|
return 0
|
|
|
|
notice_days = fields.Integer(string="Notice Period", default=_get_default_notice_days)
|