考勤数据
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user