diff --git a/addons/hr_holidays/data/hr_holidays_demo.xml b/addons/hr_holidays/data/hr_holidays_demo.xml index 4318519232b..9f2c03ab225 100644 --- a/addons/hr_holidays/data/hr_holidays_demo.xml +++ b/addons/hr_holidays/data/hr_holidays_demo.xml @@ -17,6 +17,33 @@ + + + Seniority Plan + + + + + 1 + day + 1 + yearly + + + + 4 + year + 2 + yearly + + + + 8 + year + 3 + yearly + + diff --git a/addons/hr_holidays/models/hr_leave_accrual_plan.py b/addons/hr_holidays/models/hr_leave_accrual_plan.py index cb5b30f49ed..f5782459cb2 100644 --- a/addons/hr_holidays/models/hr_leave_accrual_plan.py +++ b/addons/hr_holidays/models/hr_leave_accrual_plan.py @@ -19,6 +19,12 @@ class AccrualPlan(models.Model): string="Level Transition", default="immediately", required=True, help="""Immediately: When the date corresponds to the new level, your accrual is automatically computed, granted and you switch to new level After this accrual's period: When the accrual is complete (a week, a month), and granted, you switch to next level if allocation date corresponds""") + show_transition_mode = fields.Boolean(compute='_compute_show_transition_mode') + + @api.depends('level_ids') + def _compute_show_transition_mode(self): + for plan in self: + plan.show_transition_mode = len(plan.level_ids) > 1 @api.depends('allocation_ids') def _compute_employee_count(self): diff --git a/addons/hr_holidays/models/hr_leave_accrual_plan_level.py b/addons/hr_holidays/models/hr_leave_accrual_plan_level.py index ebeb3201b2f..256d728718e 100644 --- a/addons/hr_holidays/models/hr_leave_accrual_plan_level.py +++ b/addons/hr_holidays/models/hr_leave_accrual_plan_level.py @@ -83,7 +83,7 @@ class AccrualPlanLevel(models.Model): second_month_day = fields.Integer(default=1) second_month = fields.Selection([ ('jul', 'July'), - ('aug', 'Augustus'), + ('aug', 'August'), ('sep', 'September'), ('oct', 'October'), ('nov', 'November'), @@ -97,7 +97,7 @@ class AccrualPlanLevel(models.Model): ('may', 'May'), ('jun', 'June'), ('jul', 'July'), - ('aug', 'Augustus'), + ('aug', 'August'), ('sep', 'September'), ('oct', 'October'), ('nov', 'November'), diff --git a/addons/hr_holidays/models/hr_leave_allocation.py b/addons/hr_holidays/models/hr_leave_allocation.py index e3c0e959d61..464067abd40 100644 --- a/addons/hr_holidays/models/hr_leave_allocation.py +++ b/addons/hr_holidays/models/hr_leave_allocation.py @@ -380,6 +380,7 @@ class HolidaysAllocation(models.Model): The goal of this method is to retroactively apply accrual plan levels and progress from nextcall to today """ today = fields.Date.today() + first_allocation = _("""This allocation have already ran once, any modification won't be effective to the days allocated to the employee. If you need to change the configuration of the allocation, cancel and create a new one.""") for allocation in self: level_ids = self.accrual_plan_id.level_ids.sorted('sequence') if not level_ids: @@ -392,6 +393,7 @@ class HolidaysAllocation(models.Model): continue allocation.lastcall = max(allocation.lastcall, first_level_start_date) allocation.nextcall = first_level._get_next_date(allocation.lastcall) + allocation._message_log(body=first_allocation) days_added_per_level = defaultdict(lambda: 0) while allocation.nextcall <= today: current_level = allocation._get_current_accrual_plan_level_id(allocation.nextcall) diff --git a/addons/hr_holidays/report/hr_leave_employee_type_report.xml b/addons/hr_holidays/report/hr_leave_employee_type_report.xml index 5d4b07de1ca..4aed2f0f35b 100644 --- a/addons/hr_holidays/report/hr_leave_employee_type_report.xml +++ b/addons/hr_holidays/report/hr_leave_employee_type_report.xml @@ -5,8 +5,8 @@ hr.leave.employee.type.report - + diff --git a/addons/hr_holidays/report/hr_leave_reports.xml b/addons/hr_holidays/report/hr_leave_reports.xml index 432b2edec41..f6b9b822bc2 100644 --- a/addons/hr_holidays/report/hr_leave_reports.xml +++ b/addons/hr_holidays/report/hr_leave_reports.xml @@ -6,6 +6,7 @@ hr.leave.report + @@ -22,7 +23,6 @@ - diff --git a/addons/hr_holidays/static/src/scss/time_off.scss b/addons/hr_holidays/static/src/scss/time_off.scss index 5a9a4fa2157..a85a6cad423 100644 --- a/addons/hr_holidays/static/src/scss/time_off.scss +++ b/addons/hr_holidays/static/src/scss/time_off.scss @@ -2,11 +2,10 @@ .o_timeoff_container { height: auto; box-shadow: inset 0 -1px 0 $border-color; - - } - - .o_calendar_container { - height: auto; + position: sticky; + top: 0; + z-index: 100; + background-color: $o-webclient-background-color; } .o_timeoff_card { @@ -28,6 +27,13 @@ background-color: unset; } } + .fc-content-skeleton { + padding: 0; + + tbody { + display: none; + } + } } } } diff --git a/addons/hr_holidays/views/hr_leave_accrual_views.xml b/addons/hr_holidays/views/hr_leave_accrual_views.xml index 546a9ef2a2b..89b28731095 100644 --- a/addons/hr_holidays/views/hr_leave_accrual_views.xml +++ b/addons/hr_holidays/views/hr_leave_accrual_views.xml @@ -28,8 +28,8 @@
@@ -63,6 +63,7 @@ hr.leave.accrual.plan
+
-
+
-
+
-
-
-
-
+