mirror of
https://gitlab.com/sonalarora/tra_backend.git
synced 2025-12-18 10:49:11 +02:00
add new module
This commit is contained in:
16
hr_employee_updation/models/hr_contract_days.py
Normal file
16
hr_employee_updation/models/hr_contract_days.py
Normal file
@@ -0,0 +1,16 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user