add hr_timesheet_sheet_no_review, hr_timesheet_sheet_holidays, hr_timesheet_sheet_delete_cascade
This commit is contained in:
parent
b07082f70d
commit
8b0d0bb6cc
53 changed files with 3953 additions and 0 deletions
28
hr_timesheet_sheet_delete_cascade/models/res_company.py
Normal file
28
hr_timesheet_sheet_delete_cascade/models/res_company.py
Normal 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.",
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue