This commit is contained in:
李鹏宇
2026-03-20 19:39:21 +08:00
2 changed files with 3 additions and 4 deletions
@@ -178,7 +178,7 @@ class AppletAttendance(Controller):
check_in_str = check_in.strftime('%H:%M:%S') if check_in else ' '
check_out_str = check_out.strftime('%H:%M:%S') if check_out else ' '
has_leave_batch_workflow = False
if attendance_id.workflow_id and attendance_id.workflow_id.res_model == 'hr.leave.batch':
if attendance_id.workflow_id and attendance_id.workflow_id.res_model in ['hr.leave.batch', 'go.approval']:
has_leave_batch_workflow = True
check_in_html = f'<p style="color:green">{check_in_str}</p>' if has_leave_batch_workflow else (
@@ -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 == 'hr.leave.batch':
if attendance_id.workflow_id.res_model in ['hr.leave.batch', 'go.approval']:
has_leave_batch_workflow = True
check_in_html = (
@@ -51,7 +51,6 @@ class YuthonRenewalApproval(models.Model):
new_version = f"V{new_version_num:.1f}"
new_contract_vals = original_contract.copy_data()[0]
new_contract_type_id = original_contract.contract_type_id.id
original_contract.state = 'close'
if original_contract.contract_type_id and original_contract.contract_type_id.name:
contract_type_name = original_contract.contract_type_id.name
if '一签' in contract_type_name:
@@ -64,7 +63,7 @@ class YuthonRenewalApproval(models.Model):
new_contract_type_id = no_fixed_type.id
new_contract_vals.update({
'date_end': self.renewal_date,
# 'date_start': original_contract.date_end + relativedelta(days=1),
'date_start': original_contract.date_end + relativedelta(days=1),
'state': 'open',
'job_id': self.job_id.id,
'version': new_version,