@@ -63,13 +63,13 @@ class HrAttendance(models.Model):
|
||||
is_last_month = fields.Boolean(string="是否为上月数据", compute='_compute_month_status', store=True)
|
||||
correct_result = fields.Text(string="修正原因")
|
||||
|
||||
@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)])
|
||||
if reminder_id:
|
||||
reminder_id.state = 'done'
|
||||
# @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'
|
||||
|
||||
@api.constrains("check_out")
|
||||
def _check_out_in(self):
|
||||
@@ -562,8 +562,6 @@ class HrAttendance(models.Model):
|
||||
key = (record.employee_id.id, fields.Date.to_string(record_date))
|
||||
existing_map[key] = True
|
||||
|
||||
records_to_create = []
|
||||
|
||||
# 检查每个员工在每个日期是否有记录
|
||||
for employee in existing_employees:
|
||||
for date in date_list:
|
||||
|
||||
Reference in New Issue
Block a user