From e01171faf2cce301c179750a7fd10fda4f06ac25 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: Tue, 10 Mar 2026 18:00:46 +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
---
soong_workflow/wizard/soong_workflow_comment_wizard.py | 6 ++++++
yuthon_holiday/models/inherit_hr_leave.py | 1 +
yuthon_holiday/views/hr_leave_batch.xml | 3 ++-
3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/soong_workflow/wizard/soong_workflow_comment_wizard.py b/soong_workflow/wizard/soong_workflow_comment_wizard.py
index 38b3fc7ac..b73f79dd0 100644
--- a/soong_workflow/wizard/soong_workflow_comment_wizard.py
+++ b/soong_workflow/wizard/soong_workflow_comment_wizard.py
@@ -409,6 +409,12 @@ class SoongWorkflowCommentWizard(models.TransientModel):
is_admin = self.env.user.has_group('soong_workflow.group_soong_workflow_manager')
log_done_by_ids = [log.done_by.id for log in record_id.log_ids if log.done_by]
if self.node_btn_name == '转交':
+ if self.res_model == 'hr.leave.batch':
+ if not record_id.holiday_allowance2:
+ record_id._compute_holiday_allowance()
+ record_id.write({
+ 'holiday_allowance2': record_id.holiday_allowance,
+ })
has_comment_note = bool(self.comment_note_id)
has_comment = bool(self.comment and self.comment.strip())
if not has_comment_note and not has_comment:
diff --git a/yuthon_holiday/models/inherit_hr_leave.py b/yuthon_holiday/models/inherit_hr_leave.py
index 5182e413e..d98040f84 100644
--- a/yuthon_holiday/models/inherit_hr_leave.py
+++ b/yuthon_holiday/models/inherit_hr_leave.py
@@ -358,6 +358,7 @@ class HolidaysRequestBatch(models.Model):
remaining_compensatory_leave = fields.Float(string="剩余补休", compute='_compute_holiday_allowance')
remaining_parental_leave = fields.Float(string="剩余育儿假", compute='_compute_holiday_allowance')
holiday_allowance = fields.Text(string="可用额度", compute='_compute_holiday_allowance')
+ holiday_allowance2 = fields.Text(string="可用额度") # 固定值
active = fields.Boolean('Active', default=True, tracking=True)
def _get_default_name_title(self):
diff --git a/yuthon_holiday/views/hr_leave_batch.xml b/yuthon_holiday/views/hr_leave_batch.xml
index 9833cce9c..caa79ef6d 100644
--- a/yuthon_holiday/views/hr_leave_batch.xml
+++ b/yuthon_holiday/views/hr_leave_batch.xml
@@ -63,7 +63,8 @@
-
+
+