diff --git a/beesdoo_shift/models/attendance_sheet.py b/beesdoo_shift/models/attendance_sheet.py index 5239e65..c10e597 100644 --- a/beesdoo_shift/models/attendance_sheet.py +++ b/beesdoo_shift/models/attendance_sheet.py @@ -274,6 +274,12 @@ class AttendanceSheet(models.Model): "The sheet has already been validated and can't be edited." ) + @api.multi + def button_mark_as_read(self): + if self.is_read: + raise UserError("The sheet has already been marked as read.") + self.is_read = True + @api.constrains("expected_shift_ids", "added_shift_ids") def _constrain_unique_worker(self): added_workers = set(self.added_shift_ids.mapped("worker_id").ids) diff --git a/beesdoo_shift/views/attendance_sheet.xml b/beesdoo_shift/views/attendance_sheet.xml index 19b2ae5..b23aa04 100644 --- a/beesdoo_shift/views/attendance_sheet.xml +++ b/beesdoo_shift/views/attendance_sheet.xml @@ -76,6 +76,13 @@ /> +
+

@@ -94,11 +101,6 @@

Additional important informations

- - -

General feedback