@@ -1340,12 +1340,12 @@ class HrAttendance(models.Model):
|
||||
match_record = False
|
||||
for go in go_approval_records:
|
||||
# 按天匹配
|
||||
if go.start_date and go.end_date:
|
||||
if go.start_date and go.end_date and go.is_day:
|
||||
if go.start_date <= current_date <= go.end_date:
|
||||
match_record = go
|
||||
break
|
||||
# 按小时匹配
|
||||
if go.date_start and go.date_end:
|
||||
if go.date_start and go.date_end and go.is_hour:
|
||||
go_start = fields.Datetime.from_string(go.date_start)
|
||||
go_end = fields.Datetime.from_string(go.date_end)
|
||||
if go_start <= current_date_end and go_end >= current_date_start:
|
||||
|
||||
Reference in New Issue
Block a user