Browse Source

[ADD] b_shift : constrains on exempted workers

pull/125/head
Elouan Le Bars 5 years ago
parent
commit
3866b0eff1
  1. 8
      beesdoo_shift/models/attendance_sheet.py

8
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:

Loading…
Cancel
Save