添加功能
This commit is contained in:
@@ -299,7 +299,7 @@ class AppletAttendance(Controller):
|
||||
check_out_str = check_out.strftime('%H:%M:%S') if check_out else ' '
|
||||
has_leave_batch_workflow = False
|
||||
if hasattr(attendance_id, 'workflow_id') and attendance_id.workflow_id:
|
||||
if attendance_id.workflow_id.res_model in ['hr.leave.batch', 'go.approval']:
|
||||
if attendance_id.workflow_id.res_model in ['hr.leave.batch', 'go.approval', 'card.approval']:
|
||||
has_leave_batch_workflow = True
|
||||
|
||||
check_in_html = (
|
||||
|
||||
@@ -1036,7 +1036,10 @@ class YuthonVacationReports(models.Model):
|
||||
if att.is_abnormal: is_abnormal += 1
|
||||
|
||||
# 5. 计算应到天数(适配外派)
|
||||
contract = employee.contract_id
|
||||
# 取员工最早的合同(含已中止),从最早入职时间开始统计应到天数
|
||||
contract = self.env['hr.contract'].search([
|
||||
('employee_id', '=', employee.id),
|
||||
], order='date_start asc, id asc', limit=1)
|
||||
if is_outside:
|
||||
if exp_has_return and exp_end_return:
|
||||
work_days = rec._create_leave_record(employee, exp_end_return + timedelta(days=1), month_end)
|
||||
|
||||
Reference in New Issue
Block a user