Merge pull request !11088 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2026-04-22 03:05:11 +00:00
committed by Gitee
+8 -5
View File
@@ -75,11 +75,14 @@ class HrAttendance(models.Model):
@api.constrains("check_in")
def _check_in_out(self):
reminder_id = self.env['message.reminder.tasks'].search([('name', '=', self.employee_id.name), ('state', '=', 'todo'),
('type', '=', 'work'),
('current_data', '=', self.current_data)], limit=1)
if reminder_id:
reminder_id.state = 'done'
for record in self:
_logger.info('----------打卡取值验证--------')
_logger.info(f"当前员工姓名为{record.employee_id.name}, 当前日期为{record.current_data}")
reminder_id = self.env['message.reminder.tasks'].search([('name', '=', record.employee_id.name), ('state', '=', 'todo'),
('type', '=', 'work'),
('current_data', '=', record.current_data)], limit=1)
if reminder_id:
reminder_id.state = 'done'
@api.constrains("check_out")
def _check_out_in(self):