Odoo18-Base/addons/hr_holidays_contract/models/hr_employee_base.py
2025-01-06 10:57:38 +07:00

14 lines
526 B
Python

# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class HrEmployeeBase(models.AbstractModel):
_inherit = "hr.employee.base"
def write(self, vals):
# Prevent the resource calendar of leaves to be updated by a write to
# employee. When this module is enabled the resource calendar of
# leaves are determined by those of the contracts.
return super(HrEmployeeBase, self.with_context(no_leave_resource_calendar_update=True)).write(vals)