From 11d87d4ba94e9a94e3bd7b21766c1d225dadd17f Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Mon, 12 May 2025 19:31:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_hr_attendance/models/hr_attendance.py | 18 ++++++++++++++++++ .../views/hr_attendance_views.xml | 1 + .../views/inherit_hr_job_views.xml | 6 +++--- .../views/yuthon_hr_employee_views.xml | 18 +++++++++++------- 4 files changed, 33 insertions(+), 10 deletions(-) diff --git a/yuthon_hr_attendance/models/hr_attendance.py b/yuthon_hr_attendance/models/hr_attendance.py index 9516e8d46..45d028808 100644 --- a/yuthon_hr_attendance/models/hr_attendance.py +++ b/yuthon_hr_attendance/models/hr_attendance.py @@ -777,6 +777,24 @@ class HrAttendance(models.Model): else: record.shift_name = '行政班次' + def labor_update(self): + start_date = fields.Date.to_date('2025-05-01') + end_date = fields.Date.to_date('2025-05-05') + # 搜索符合条件的考勤记录 + attendance_records = self.search([ + ('current_data', '>=', start_date), + ('current_data', '<=', end_date), + ('shift_id', '=', False), + ]) + if attendance_records: + for record in attendance_records: + record.write({ + 'is_no_card': False, + 'is_early_card': False, + 'is_late_card': False, + 'is_abnormal': False, + }) + class card_remind_form(models.Model): _name = 'card.remind.form' _description = '测试表单' diff --git a/yuthon_hr_attendance/views/hr_attendance_views.xml b/yuthon_hr_attendance/views/hr_attendance_views.xml index 20d1b6f54..162dfeb65 100644 --- a/yuthon_hr_attendance/views/hr_attendance_views.xml +++ b/yuthon_hr_attendance/views/hr_attendance_views.xml @@ -10,6 +10,7 @@
+
diff --git a/yuthon_hr_employee/views/inherit_hr_job_views.xml b/yuthon_hr_employee/views/inherit_hr_job_views.xml index 4b7ee6b62..8fed581ce 100644 --- a/yuthon_hr_employee/views/inherit_hr_job_views.xml +++ b/yuthon_hr_employee/views/inherit_hr_job_views.xml @@ -77,6 +77,9 @@ 任职要求 + + 1 + @@ -143,9 +146,6 @@ - - - diff --git a/yuthon_hr_employee/views/yuthon_hr_employee_views.xml b/yuthon_hr_employee/views/yuthon_hr_employee_views.xml index 2e273e96b..746d317b8 100644 --- a/yuthon_hr_employee/views/yuthon_hr_employee_views.xml +++ b/yuthon_hr_employee/views/yuthon_hr_employee_views.xml @@ -354,9 +354,14 @@ 1 + + + + - - + + + @@ -369,7 +374,6 @@ - @@ -388,11 +392,11 @@ 1 - - hide + + hide - - + + 1 hide