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 @@
+