From 180460eb17db3bd590bf7c5958114c439168cfd7 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, 6 Jan 2026 15:03:13 +0800
Subject: [PATCH 1/3] =?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
---
.../models/yuthon_vacation_reports.py | 5 +----
yuthon_issue/models/issue_library.py | 2 +-
yuthon_issue/views/issue_library_views.xml | 6 +++---
yuthon_official/models/yuthon_official.py | 15 +++++++++++++++
yuthon_official/models/yuthon_sub_enterprises.py | 1 +
yuthon_official/views/yuthon_official_views.xml | 1 +
.../views/yuthon_sub_enterprises_view.xml | 1 +
7 files changed, 23 insertions(+), 8 deletions(-)
diff --git a/yuthon_hr_attendance/models/yuthon_vacation_reports.py b/yuthon_hr_attendance/models/yuthon_vacation_reports.py
index b6ab5f215..8f489316f 100644
--- a/yuthon_hr_attendance/models/yuthon_vacation_reports.py
+++ b/yuthon_hr_attendance/models/yuthon_vacation_reports.py
@@ -878,10 +878,7 @@ class VacationLeaveLine(models.Model):
if vals.get('update_type') == 'reduce' and vals.get('vacation_id'):
vacation_main = self.env['yuthon.vacation.reports'].browse(vals['vacation_id'])
- deduct_amount = vals.get('update_lines', 0.0)
-
- if not vacation_main or deduct_amount <= 0:
- return super(VacationLeaveLine, self).create(vals)
+ deduct_amount = vals.get('update_lines', 0.0) / 8
if vacation_main:
used_this_year_new = vacation_main.used_this_year + deduct_amount
diff --git a/yuthon_issue/models/issue_library.py b/yuthon_issue/models/issue_library.py
index f7f8e8a1f..1707e215c 100644
--- a/yuthon_issue/models/issue_library.py
+++ b/yuthon_issue/models/issue_library.py
@@ -244,7 +244,7 @@ class IssueLibrary(models.Model):
self.issue_approval_id = issue_approval_id
return {
"type": "ir.actions.act_window",
- "name": "批量提交",
+ "name": "提交议题审批",
"res_model": "issue.approval",
"views": [[form_id, "form"]],
"res_id": issue_approval_id.id,
diff --git a/yuthon_issue/views/issue_library_views.xml b/yuthon_issue/views/issue_library_views.xml
index 05ed4664b..e01ffc0b8 100644
--- a/yuthon_issue/views/issue_library_views.xml
+++ b/yuthon_issue/views/issue_library_views.xml
@@ -45,9 +45,9 @@
decoration-info="issue_state == 'will'"
decoration-success="issue_state == 'done'"
decoration-muted="issue_state == 'cancel'">
-
-
-
+
diff --git a/yuthon_official/models/yuthon_official.py b/yuthon_official/models/yuthon_official.py
index a3ce672a7..1d1f6632c 100644
--- a/yuthon_official/models/yuthon_official.py
+++ b/yuthon_official/models/yuthon_official.py
@@ -57,6 +57,7 @@ class YuthonOfficial(models.Model):
issue_library_ids = fields.One2many('issue.library', 'yuthon_official_id', string="议题关联")
work_end = fields.Boolean(string="结束")
official_state = fields.Selection([('to_do', '待转'), ('done', '已转')], string="状态")
+ sub_id = fields.Many2one('yuthon.sub.enterprises', string="文件处理流程")
def _get_default_name_title(self):
return self._description if self._description else self._name
@@ -64,6 +65,20 @@ class YuthonOfficial(models.Model):
name_title = fields.Char(default=_get_default_name_title)
self_users_ids = fields.Many2many('res.users', string="当前经办人", default=lambda self: [(6, 0, [self.env.user.id])])
+
+ def end_approval(self):
+ self.write({'work_end': True})
+ if self.main_flats_id.name == '广州市天河投资集团有限公司':
+ process_id = self.env['yuthon.sub.enterprises'].search([('issuance_process_id', '=', self.id)])
+ if not process_id:
+ official_partner_id = self.env['official.partner'].search([('name', '=', '广州市天河投资集团有限公司')])
+ sub_id = self.env['yuthon.sub.enterprises'].create({
+ 'users_id': self.users_id.id,
+ 'official_partner_id': official_partner_id.id,
+ 'issuance_process_id': self.id,
+ })
+ self.write({'sub_id': sub_id.id})
+
@api.onchange('is_cold')
def onchange_is_cold(self):
if self.is_cold:
diff --git a/yuthon_official/models/yuthon_sub_enterprises.py b/yuthon_official/models/yuthon_sub_enterprises.py
index d0d7aa369..ed365ee8f 100644
--- a/yuthon_official/models/yuthon_sub_enterprises.py
+++ b/yuthon_official/models/yuthon_sub_enterprises.py
@@ -15,6 +15,7 @@ class YuthonSubEnterprises(models.Model):
users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
company_id = fields.Many2one(related='users_id.employee_id.company_id', string="公司")
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
+ issuance_process_id = fields.Many2one('yuthon.official', string="发文流程")
come_file_id = fields.Char(string="来文编号")
reason_application = fields.Text(string="事由")
official_partner_id = fields.Many2one('official.partner', string="来文单位")
diff --git a/yuthon_official/views/yuthon_official_views.xml b/yuthon_official/views/yuthon_official_views.xml
index 021248b0f..6aa902ba9 100644
--- a/yuthon_official/views/yuthon_official_views.xml
+++ b/yuthon_official/views/yuthon_official_views.xml
@@ -81,6 +81,7 @@
+
diff --git a/yuthon_official/views/yuthon_sub_enterprises_view.xml b/yuthon_official/views/yuthon_sub_enterprises_view.xml
index 59a4059b3..012b1ebd4 100644
--- a/yuthon_official/views/yuthon_sub_enterprises_view.xml
+++ b/yuthon_official/views/yuthon_sub_enterprises_view.xml
@@ -45,6 +45,7 @@
+
From 38fcc43e5fb81c3bb340f53ed2a6b0e1e53f04da 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, 6 Jan 2026 15:04:27 +0800
Subject: [PATCH 2/3] =?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_official/models/yuthon_official.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/yuthon_official/models/yuthon_official.py b/yuthon_official/models/yuthon_official.py
index 1d1f6632c..bd984debb 100644
--- a/yuthon_official/models/yuthon_official.py
+++ b/yuthon_official/models/yuthon_official.py
@@ -73,6 +73,7 @@ class YuthonOfficial(models.Model):
if not process_id:
official_partner_id = self.env['official.partner'].search([('name', '=', '广州市天河投资集团有限公司')])
sub_id = self.env['yuthon.sub.enterprises'].create({
+ 'name': '广州市天河投资集团有限公司文件处理',
'users_id': self.users_id.id,
'official_partner_id': official_partner_id.id,
'issuance_process_id': self.id,
From 7e94c68faa46bb7a1c1c9dc60eb49b5acc650eb3 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, 6 Jan 2026 15:10:12 +0800
Subject: [PATCH 3/3] =?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_official/models/yuthon_sub_enterprises.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/yuthon_official/models/yuthon_sub_enterprises.py b/yuthon_official/models/yuthon_sub_enterprises.py
index ed365ee8f..98c52dbbd 100644
--- a/yuthon_official/models/yuthon_sub_enterprises.py
+++ b/yuthon_official/models/yuthon_sub_enterprises.py
@@ -6,7 +6,7 @@ from odoo.exceptions import ValidationError, UserError
class YuthonSubEnterprises(models.Model):
_name = 'yuthon.sub.enterprises'
_description = '文件处理(子企业)'
- _inherit = ['mail.thread.main.attachment', 'mail.activity.mixin']
+ _inherit = ['mail.thread.main.attachment', 'mail.activity.mixin', 'soong.workflow.mixin']
_rec_name = 'name'