Browse Source

[FIX] b_shift : attendance sheet shifts worker not required

pull/143/head
Elouan Le Bars 5 years ago
parent
commit
ea0bb5d047
  1. 2
      beesdoo_shift/models/attendance_sheet.py

2
beesdoo_shift/models/attendance_sheet.py

@ -46,7 +46,6 @@ class AttendanceSheetShift(models.Model):
("working_mode", "in", ("regular", "irregular")), ("working_mode", "in", ("regular", "irregular")),
("state", "not in", ("unsubscribed", "resigning")), ("state", "not in", ("unsubscribed", "resigning")),
], ],
required=True,
) )
task_type_id = fields.Many2one( task_type_id = fields.Many2one(
"beesdoo.shift.type", string="Task Type", default=_default_task_type_id "beesdoo.shift.type", string="Task Type", default=_default_task_type_id
@ -342,6 +341,7 @@ class AttendanceSheet(models.Model):
compensation_nb = "1" compensation_nb = "1"
else: else:
compensation_nb = "2" compensation_nb = "2"
if task.worker_id:
new_expected_shift = expected_shift.create( new_expected_shift = expected_shift.create(
{ {
"attendance_sheet_id": new_sheet.id, "attendance_sheet_id": new_sheet.id,

Loading…
Cancel
Save