!8990 添加功能

Merge pull request !8990 from 李鹏宇/dev_zhou
This commit is contained in:
李鹏宇
2026-02-26 02:16:43 +00:00
committed by Gitee
2 changed files with 4 additions and 4 deletions
+2 -4
View File
@@ -401,10 +401,10 @@ class HolidaysRequestBatch(models.Model):
if self.leave_ids:
for record in self.leave_ids:
record.write({'state': 'validate'})
record.sudo().write({'state': 'validate'})
if self.hour_leave_ids:
for record in self.hour_leave_ids:
record.write({'state': 'validate'})
record.sudo().write({'state': 'validate'})
"""提交请假申请,区分年假和其他假期处理"""
self._process_specific_leaves('年假', is_annual_leave=True)
@@ -602,8 +602,6 @@ class HolidaysRequestBatch(models.Model):
actual_vacation_report._compute_working_overtime()
if self.env.user.company_id.name == '集团本部':
domain = [
('employee_id.name', '=', '吴欣欣'),
'|',
('is_initial_number', '=', True),
'&', ('is_initial_number', '=', False),
'&', ('update_type', '=', 'add'),
@@ -313,6 +313,8 @@ class HrAttendanceDetail(models.Model):
check_in_time = min(valid_checkins) - timedelta(hours=8) if valid_checkins else None
check_out_start = self.float_to_datetime(current_data, template.check_out_start)
check_out_end = self.float_to_datetime(current_data, template.check_out_end)
if template.check_out_start == 0.0:
template.check_out_start = 24.0
if template.check_out_end < template.check_out_start:
check_out_end = self.float_to_datetime(next_day, template.check_out_end)
# 筛选在下班时间范围内的打卡记录