Merge pull request !7861 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2026-01-10 10:04:11 +00:00
committed by Gitee
2 changed files with 12 additions and 0 deletions
@@ -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()
@@ -36,6 +36,7 @@
<!-- </header>-->
<field name="employee_id"/>
<field name="checkin_time"/>
<field name="seconds"/>
<field name="source"/>
<field name="attendance_iot_id"/>
<field name="department_id"/>