Compare commits
1 Commits
18.0-migra
...
d24477bed9
| Author | SHA1 | Date | |
|---|---|---|---|
| d24477bed9 |
@@ -377,13 +377,13 @@ class TestHrLeaveTimeoffDay(TransactionCase):
|
|||||||
def test_public_holidays_between_a_leave(self):
|
def test_public_holidays_between_a_leave(self):
|
||||||
# Leaves the code below commented because
|
# Leaves the code below commented because
|
||||||
# the default database already has a public holiday on 8th May 2025
|
# the default database already has a public holiday on 8th May 2025
|
||||||
self.env["resource.calendar.leaves"].create(
|
# self.env["resource.calendar.leaves"].create(
|
||||||
{
|
# {
|
||||||
"name": "8 mai 2025",
|
# "name": "8 mai 2025",
|
||||||
"date_from": Date.to_date("2025-05-07 22:00:00"),
|
# "date_from": Date.to_date("2025-05-07 22:00:00"),
|
||||||
"date_to": Date.to_date("2025-05-08 23:00:00"),
|
# "date_to": Date.to_date("2025-05-08 23:00:00"),
|
||||||
}
|
# }
|
||||||
)
|
# )
|
||||||
leave = self.env["hr.leave"].create(
|
leave = self.env["hr.leave"].create(
|
||||||
{
|
{
|
||||||
"employee_id": self.employee.id,
|
"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"
|
len(timeoff_days), 5, "There should be 5 timeoff days for this leave"
|
||||||
)
|
)
|
||||||
|
|
||||||
leave.state = "confirm"
|
leave.state = "draft"
|
||||||
|
|
||||||
self.env["hr.leave.timeoff.day"].cron_manage_timeoff_days()
|
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
|
# 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"
|
len(timeoff_days), 5, "There should be 5 timeoff days for this leave"
|
||||||
)
|
)
|
||||||
|
|
||||||
leave.state = "confirm"
|
leave.state = "draft"
|
||||||
leave.unlink()
|
leave.unlink()
|
||||||
|
|
||||||
self.env["hr.leave.timeoff.day"].cron_manage_timeoff_days()
|
self.env["hr.leave.timeoff.day"].cron_manage_timeoff_days()
|
||||||
|
|||||||
Reference in New Issue
Block a user