From f71ee0ef58dd6471ced5bc224b734a3b64b94a1f Mon Sep 17 00:00:00 2001 From: benjamin <benjamin@le-filament.com> Date: Wed, 15 May 2024 18:46:38 +0200 Subject: [PATCH] [UPD] check timesheet for holiday --- models/hr_timesheet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/hr_timesheet.py b/models/hr_timesheet.py index 4d40305..54ed917 100644 --- a/models/hr_timesheet.py +++ b/models/hr_timesheet.py @@ -202,7 +202,7 @@ class ScopHrTimesheet(models.Model): ("resource_id", "=", False), ] ) - if line.date.weekday() in (5, 6) or holiday: + if not line.holiday_id and (line.date.weekday() in (5, 6) or holiday): raise ValidationError( _( "Vous ne pouvez imputer du temps sur un weekend " -- GitLab