Browse Source

[ADD] b_shift : constrains on exempted workers

pull/143/head
Elouan Le Bars 5 years ago
parent
commit
3a3d49e2cc
  1. 8
      beesdoo_shift/models/attendance_sheet.py

8
beesdoo_shift/models/attendance_sheet.py

@ -539,6 +539,14 @@ class AttendanceSheet(models.Model):
_("Working mode is missing for %s") _("Working mode is missing for %s")
% added_shift.worker_id.name % 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: for expected_shift in self.expected_shift_ids:
if not expected_shift.state: if not expected_shift.state:

Loading…
Cancel
Save