add hr_timesheet_sheet_no_review, hr_timesheet_sheet_holidays, hr_timesheet_sheet_delete_cascade

This commit is contained in:
Luis 2026-09-22 10:58:36 +02:00
parent b07082f70d
commit 8b0d0bb6cc
53 changed files with 3953 additions and 0 deletions

View file

@ -0,0 +1,28 @@
# Copyright 2026 Criptomart
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
LEAVE_POLICY_SELECTION = [
("detach", "Keep the time off, detach its lines"),
("cancel", "Cancel the time off and restore the balance"),
]
class ResCompany(models.Model):
_inherit = "res.company"
timesheet_sheet_delete_leave_policy = fields.Selection(
selection=LEAVE_POLICY_SELECTION,
string="Time Off Policy On Sheet Deletion",
default="detach",
required=True,
help="What happens to the time off entries contained in a timesheet"
" sheet when the sheet is deleted.\n"
"Keep the time off: the time off request is left untouched, its"
" entries are detached from the sheet and survive, and the employee"
" balance does not change.\n"
"Cancel the time off: the whole time off request is refused and"
" deleted, and the days are restored to the employee balance. This"
" cannot be undone.",
)