Compare commits
2 Commits
8c8b617e8c
...
18.0-migra
| Author | SHA1 | Date | |
|---|---|---|---|
| bc64030847 | |||
| 517a59b59d |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
|
.ruff_cache/
|
||||||
*.*~
|
*.*~
|
||||||
*.pyc
|
*.pyc
|
||||||
|
|||||||
@@ -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 = "draft"
|
leave.state = "confirm"
|
||||||
|
|
||||||
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 = "draft"
|
leave.state = "confirm"
|
||||||
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