考勤数据

This commit is contained in:
李鹏宇
2026-06-04 11:54:03 +08:00
parent 685cbb890d
commit 40721723af
8 changed files with 288 additions and 5 deletions
@@ -98,6 +98,9 @@ class HrAttendanceDetail(models.Model):
@api.model
def create(self, vals):
record = super(HrAttendanceDetail, self).create(vals)
# 批量导入时跳过企业微信通知
if self.env.context.get('skip_iot_notify'):
return record
if record.employee_id.name not in ['Administrator']:
resource_user_ids = record.employee_id.resource_calendar_id.resource_user_ids.ids
is_resource_user = True if record.employee_id.id in resource_user_ids else False