From 39c6d5b3f01271986f9b9ec1274181e210141ece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Fri, 14 Aug 2026 15:50:57 +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/controllers/applet_attendance.py | 8 ++++---- yuthon_hr_attendance/controllers/portal.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/yuthon_hr_attendance/controllers/applet_attendance.py b/yuthon_hr_attendance/controllers/applet_attendance.py index 1b63ef5e1..46d6af2b1 100644 --- a/yuthon_hr_attendance/controllers/applet_attendance.py +++ b/yuthon_hr_attendance/controllers/applet_attendance.py @@ -181,11 +181,11 @@ class AppletAttendance(Controller): if attendance_id.workflow_id and attendance_id.workflow_id.res_model in ['hr.leave.batch', 'go.approval']: has_leave_batch_workflow = True - check_in_html = f'

{check_in_str}

' if has_leave_batch_workflow else ( + check_in_html = f'

{check_in_str}

' if (has_leave_batch_workflow or shift_name == '外派') else ( f'

{check_in_str}

' if check_in_status in ['迟到', '早退', '缺卡'] else f'

{check_in_str}

' ) - check_out_html = f'

{check_out_str}

' if has_leave_batch_workflow else ( + check_out_html = f'

{check_out_str}

' if (has_leave_batch_workflow or shift_name == '外派') else ( f'

{check_out_str}

' if check_out_status in ['迟到', '早退', '缺卡'] else f'

{check_out_str}

' ) @@ -304,7 +304,7 @@ class AppletAttendance(Controller): check_in_html = ( f'

{check_in_str}

' - if has_leave_batch_workflow + if has_leave_batch_workflow or shift_name == '外派' else ( f'

{check_in_str}

' if check_in_status in ['迟到', '早退', '缺卡'] @@ -313,7 +313,7 @@ class AppletAttendance(Controller): ) check_out_html = ( f'

{check_out_str}

' - if has_leave_batch_workflow + if has_leave_batch_workflow or shift_name == '外派' else ( f'

{check_out_str}

' if check_out_status in ['迟到', '早退', '缺卡'] diff --git a/yuthon_hr_attendance/controllers/portal.py b/yuthon_hr_attendance/controllers/portal.py index 9cbf6590c..ca14d18fa 100644 --- a/yuthon_hr_attendance/controllers/portal.py +++ b/yuthon_hr_attendance/controllers/portal.py @@ -102,7 +102,7 @@ class CustomerPortal(portal.CustomerPortal): # 'pending_tip': pending_tip if has_pending else '', '日期': record.display_date, '应到': format_vacation_value(record.should_attendance, '天'), - '实到': f"{record.actual_attendance}天", + '实到': format_vacation_value(record.actual_attendance, '天'), '外派': format_vacation_value(record.expatriation, '天'), '迟到': format_vacation_value(record.is_late_card, '次'), '早退': format_vacation_value(record.is_early_card, '次'),