[IMP] hr_holidays_timeoff_analysis : migrate from version 16 to 18
All checks were successful
pre-commit / pre-commit (pull_request) Successful in 1m26s
All checks were successful
pre-commit / pre-commit (pull_request) Successful in 1m26s
This commit is contained in:
@@ -377,13 +377,13 @@ class TestHrLeaveTimeoffDay(TransactionCase):
|
||||
def test_public_holidays_between_a_leave(self):
|
||||
# Leaves the code below commented because
|
||||
# the default database already has a public holiday on 8th May 2025
|
||||
# self.env["resource.calendar.leaves"].create(
|
||||
# {
|
||||
# "name": "8 mai 2025",
|
||||
# "date_from": Date.to_date("2025-05-07 22:00:00"),
|
||||
# "date_to": Date.to_date("2025-05-08 23:00:00"),
|
||||
# }
|
||||
# )
|
||||
self.env["resource.calendar.leaves"].create(
|
||||
{
|
||||
"name": "8 mai 2025",
|
||||
"date_from": Date.to_date("2025-05-07 22:00:00"),
|
||||
"date_to": Date.to_date("2025-05-08 23:00:00"),
|
||||
}
|
||||
)
|
||||
leave = self.env["hr.leave"].create(
|
||||
{
|
||||
"employee_id": self.employee.id,
|
||||
@@ -438,7 +438,7 @@ class TestHrLeaveTimeoffDay(TransactionCase):
|
||||
len(timeoff_days), 5, "There should be 5 timeoff days for this leave"
|
||||
)
|
||||
|
||||
leave.state = "draft"
|
||||
leave.state = "confirm"
|
||||
|
||||
self.env["hr.leave.timeoff.day"].cron_manage_timeoff_days()
|
||||
# Vérifie qu'il n'existe plus de hr.leave.timeoff.day pour ce leave
|
||||
@@ -475,7 +475,7 @@ class TestHrLeaveTimeoffDay(TransactionCase):
|
||||
len(timeoff_days), 5, "There should be 5 timeoff days for this leave"
|
||||
)
|
||||
|
||||
leave.state = "draft"
|
||||
leave.state = "confirm"
|
||||
leave.unlink()
|
||||
|
||||
self.env["hr.leave.timeoff.day"].cron_manage_timeoff_days()
|
||||
|
||||
Reference in New Issue
Block a user