添加功能
This commit is contained in:
@@ -429,6 +429,12 @@ class OvertimeApprovals(models.Model):
|
||||
('employee_id', '=', employee_id.id),
|
||||
('vacation_date', '=', vacation_date)
|
||||
])
|
||||
if not reports_id:
|
||||
reports_id = self.env['yuthon.vacation.reports'].create({
|
||||
'employee_id': employee_id.id,
|
||||
'vacation_date': vacation_date,
|
||||
})
|
||||
reports_id.vacation_state = 'not_sent'
|
||||
|
||||
# 如果当月考勤确认单已确认,则将数据加到下个月的确认单
|
||||
if reports_id and reports_id.vacation_state == 'confirmed':
|
||||
|
||||
Reference in New Issue
Block a user