From a370892aec19008f9b17a38910785dcdcb74c5d1 Mon Sep 17 00:00:00 2001 From: Aungkokolin1997 Date: Mon, 13 Apr 2026 07:16:06 +0000 Subject: [PATCH] [IMP] hr_attendance_flex_rest_time: improve compute logic --- hr_attendance_flex_rest_time/models/hr_attendance.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hr_attendance_flex_rest_time/models/hr_attendance.py b/hr_attendance_flex_rest_time/models/hr_attendance.py index 4cb3ec5..50518b6 100644 --- a/hr_attendance_flex_rest_time/models/hr_attendance.py +++ b/hr_attendance_flex_rest_time/models/hr_attendance.py @@ -30,10 +30,8 @@ def _compute_is_rest_time_editable(self): for rec in self: if is_manager: rec.is_rest_time_editable = True - elif is_officer: - rec.is_rest_time_editable = ( - rec.employee_id.attendance_manager_id == self.env.user - ) + elif is_officer and rec.employee_id.attendance_manager_id == self.env.user: + rec.is_rest_time_editable = True else: rec.is_rest_time_editable = rec.overtime_status != "approved"