From c997af4f578382cc586d487279b41dad495355a6 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: Sat, 10 Jan 2026 18:03:15 +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
---
.../models/hr_attendance_detail_wechat.py | 11 +++++++++++
.../views/hr_attendance_detail_wechat_views.xml | 1 +
2 files changed, 12 insertions(+)
diff --git a/yuthon_hr_attendance/models/hr_attendance_detail_wechat.py b/yuthon_hr_attendance/models/hr_attendance_detail_wechat.py
index bc5306c11..e56b5542b 100644
--- a/yuthon_hr_attendance/models/hr_attendance_detail_wechat.py
+++ b/yuthon_hr_attendance/models/hr_attendance_detail_wechat.py
@@ -66,6 +66,17 @@ class HrAttendanceDetail(models.Model):
attendance_detail_image_ids = fields.One2many(string="打卡记录图片", comodel_name='hr.attendance.detail.image',
inverse_name='attendance_detail_id')
hr_attendance_id = fields.Many2one('hr.attendance', string="出勤记录", ondelete="cascade", readonly=True)
+ seconds = fields.Integer(
+ string='秒',
+ compute='_compute_seconds',
+ )
+ @api.depends('checkin_time')
+ def _compute_seconds(self):
+ for record in self:
+ if not record.checkin_time:
+ record.seconds = 0
+ continue
+ record.seconds = record.checkin_time.second
def action_show_details(self):
self.ensure_one()
diff --git a/yuthon_hr_attendance/views/hr_attendance_detail_wechat_views.xml b/yuthon_hr_attendance/views/hr_attendance_detail_wechat_views.xml
index 41d471f30..41d14a9fa 100644
--- a/yuthon_hr_attendance/views/hr_attendance_detail_wechat_views.xml
+++ b/yuthon_hr_attendance/views/hr_attendance_detail_wechat_views.xml
@@ -36,6 +36,7 @@
+