From 0ee6199b0a212f9e21100a09e3bc09a340630b0e 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: Thu, 11 Jun 2026 11:35:12 +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_attendance/models/yuthon_duty_plan.py | 9 +++++++++
yuthon_hr_attendance/views/yuthon_duty_plan_views.xml | 1 +
.../wizard/soong_workflow_comment_wizard_inherit.xml | 6 +++++-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/yuthon_hr_attendance/models/yuthon_duty_plan.py b/yuthon_hr_attendance/models/yuthon_duty_plan.py
index 09bfb0a3b..1edff95a6 100644
--- a/yuthon_hr_attendance/models/yuthon_duty_plan.py
+++ b/yuthon_hr_attendance/models/yuthon_duty_plan.py
@@ -17,6 +17,15 @@ class YuthonDutyPlan(models.Model):
white_line_ids = fields.One2many('white.plan.line', 'duty_plan_id', string='关联常白班')
notice = fields.Text(string='计划说明')
zu = fields.Integer(string='值班组')
+ scheduled_month = fields.Integer(string='已排到月份', compute='_compute_scheduled_month', store=True)
+
+ @api.depends('plan_line_ids')
+ def _compute_scheduled_month(self):
+ for rec in self:
+ last_slot = self.env['planning.slot'].search(
+ [('role_id.name', '=', '联安粮库')],
+ order='start_datetime desc', limit=1)
+ rec.scheduled_month = last_slot.start_datetime.month if last_slot else 0
@api.onchange('plan_line_ids', 'white_line_ids')
def _onchange_sync_lianan_role_employees(self):
diff --git a/yuthon_hr_attendance/views/yuthon_duty_plan_views.xml b/yuthon_hr_attendance/views/yuthon_duty_plan_views.xml
index fe63cef00..0a86488e0 100644
--- a/yuthon_hr_attendance/views/yuthon_duty_plan_views.xml
+++ b/yuthon_hr_attendance/views/yuthon_duty_plan_views.xml
@@ -36,6 +36,7 @@
+
diff --git a/yuthon_issue/wizard/soong_workflow_comment_wizard_inherit.xml b/yuthon_issue/wizard/soong_workflow_comment_wizard_inherit.xml
index 351861c4a..798cf8564 100644
--- a/yuthon_issue/wizard/soong_workflow_comment_wizard_inherit.xml
+++ b/yuthon_issue/wizard/soong_workflow_comment_wizard_inherit.xml
@@ -15,15 +15,19 @@
invisible="not is_avoid" options="{'no_create': True}"
domain="[('id', 'in', issue_filter_ids)]"/>
+
-
+
+
+