From f3bc23c5063ff7918c4ce80ba75f6e5e78226a22 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?=
<9664676+pengyuthon@user.noreply.gitee.com>
Date: Wed, 12 Nov 2025 17:01:02 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
yuthon_hr_employee_approval/models/yuthon_leaving_approval.py | 2 +-
.../views/yuthon_leaving_approval_views.xml | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/yuthon_hr_employee_approval/models/yuthon_leaving_approval.py b/yuthon_hr_employee_approval/models/yuthon_leaving_approval.py
index d7908043e..8cd5100d1 100644
--- a/yuthon_hr_employee_approval/models/yuthon_leaving_approval.py
+++ b/yuthon_hr_employee_approval/models/yuthon_leaving_approval.py
@@ -54,7 +54,7 @@ class YuthonLeavingApproval(models.Model):
('is_execution', '=', False)
])
for record in leaving_approval_ids:
- if current_date >= record.end_date:
+ if current_date >= record.separation_date:
record.employee_id.user_state = 'leave'
if record.employee_id.contract_id:
record.employee_id.contract_id.state = 'cancel'
diff --git a/yuthon_hr_employee_approval/views/yuthon_leaving_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_leaving_approval_views.xml
index 95fce9a6e..677cff0c5 100644
--- a/yuthon_hr_employee_approval/views/yuthon_leaving_approval_views.xml
+++ b/yuthon_hr_employee_approval/views/yuthon_leaving_approval_views.xml
@@ -56,6 +56,7 @@
+