From c18a6e803f4de8e7deb3d222d1e4fd81f1b48fd5 Mon Sep 17 00:00:00 2001 From: Elouan Le Bars Date: Wed, 8 Jan 2020 17:12:37 +0100 Subject: [PATCH] [FIX] b_shift : attendance sheet 'is_annotated' --- beesdoo_shift/models/attendance_sheet.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/beesdoo_shift/models/attendance_sheet.py b/beesdoo_shift/models/attendance_sheet.py index 60215b4..8239343 100644 --- a/beesdoo_shift/models/attendance_sheet.py +++ b/beesdoo_shift/models/attendance_sheet.py @@ -279,7 +279,9 @@ class AttendanceSheet(models.Model): @api.depends("annotation") def _compute_is_annotated(self): for rec in self: - rec.is_annotated = bool(rec.annotation.strip()) + if rec.annotation: + return bool(rec.annotation.strip()) + return False @api.constrains("expected_shift_ids", "added_shift_ids") def _constrain_unique_worker(self):