diff --git a/beesdoo_shift/models/attendance_sheet.py b/beesdoo_shift/models/attendance_sheet.py index 1c72094..6eb17ec 100644 --- a/beesdoo_shift/models/attendance_sheet.py +++ b/beesdoo_shift/models/attendance_sheet.py @@ -553,6 +553,14 @@ class AttendanceSheet(models.Model): _("Working mode is missing for %s") % added_shift.worker_id.name ) + if added_shift.working_mode not in ["regular", "irregular"]: + raise UserError( + _("Warning : Working mode for %s is %s") + % ( + added_shift.worker_id.name, + added_shift.worker_id.working_mode, + ) + ) for expected_shift in self.expected_shift_ids: if not expected_shift.state: