From 87906ac6f75e852914a31cfc34b2d9346e83dcd3 Mon Sep 17 00:00:00 2001
From: zhou <123@>
Date: Sat, 24 May 2025 15:08:17 +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_holiday/data/yuthon_holiday_data.xml | 1 +
yuthon_holiday/models/yuthon_fixes_approval.py | 5 ++++-
yuthon_holiday/views/yuthon_fixes_approval_views.xml | 1 +
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/yuthon_holiday/data/yuthon_holiday_data.xml b/yuthon_holiday/data/yuthon_holiday_data.xml
index b3088c82c..c8b17a38e 100644
--- a/yuthon_holiday/data/yuthon_holiday_data.xml
+++ b/yuthon_holiday/data/yuthon_holiday_data.xml
@@ -12,5 +12,6 @@
yuthon_holiday_fixes_code
XZ
4
+
\ No newline at end of file
diff --git a/yuthon_holiday/models/yuthon_fixes_approval.py b/yuthon_holiday/models/yuthon_fixes_approval.py
index 694fb15d0..a4f146be7 100644
--- a/yuthon_holiday/models/yuthon_fixes_approval.py
+++ b/yuthon_holiday/models/yuthon_fixes_approval.py
@@ -51,5 +51,8 @@ class YuthonFixesApproval(models.Model):
'number_of_days': number_of_days,
'type_request_unit':type_request_unit,})
-
+ @api.onchange('users_id', 'original_hours', 'now_hours')
+ def _onchange_name(self):
+ if self.users_id and self.original_hours and self.now_hours:
+ self.name = self.users_id.name + '原时长'+ str(self.original_hours) + '小时' + '现时长' + str(self.now_hours) + '小时'
diff --git a/yuthon_holiday/views/yuthon_fixes_approval_views.xml b/yuthon_holiday/views/yuthon_fixes_approval_views.xml
index c76ed18e9..5f7830933 100644
--- a/yuthon_holiday/views/yuthon_fixes_approval_views.xml
+++ b/yuthon_holiday/views/yuthon_fixes_approval_views.xml
@@ -45,6 +45,7 @@
+