From 73137c61b97313fb8006792aa2ac692c18432d91 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: Sun, 28 Dec 2025 14:49:06 +0800
Subject: [PATCH 01/12] =?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_purchase/views/inherit_purchase_order_views.xml | 1 -
1 file changed, 1 deletion(-)
diff --git a/yuthon_purchase/views/inherit_purchase_order_views.xml b/yuthon_purchase/views/inherit_purchase_order_views.xml
index d4087cd1d..b667adcd7 100644
--- a/yuthon_purchase/views/inherit_purchase_order_views.xml
+++ b/yuthon_purchase/views/inherit_purchase_order_views.xml
@@ -64,7 +64,6 @@
-
明细
From 5ef0a66242ab2fb84c7878f2d51a704344fb235e 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: Sun, 28 Dec 2025 14:52:18 +0800
Subject: [PATCH 02/12] =?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_purchase/models/inherit_purchase_order.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/yuthon_purchase/models/inherit_purchase_order.py b/yuthon_purchase/models/inherit_purchase_order.py
index 8f2a86f44..6e5a0e939 100644
--- a/yuthon_purchase/models/inherit_purchase_order.py
+++ b/yuthon_purchase/models/inherit_purchase_order.py
@@ -21,7 +21,6 @@ class InheritPurchaseOrder(models.Model):
('分管领导', '分管领导'),
('总经理', '总经理')], default='draft')
work_end = fields.Boolean(string="结束")
- active = fields.Boolean('Active', default=True, tracking=True)
user_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user)
company_id = fields.Many2one(related='user_id.employee_ids.company_id', string="公司")
department_id = fields.Many2one(related='user_id.employee_ids.department_id', string="部门")
From 034a2917e9d8503c8b2b4ec7cf8e6e707d9983a0 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: Sun, 28 Dec 2025 15:33:50 +0800
Subject: [PATCH 03/12] =?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_record_delete_wizard.py | 6 +++++
.../models/contract_review_approval.py | 2 +-
.../views/contract_review_approval_views.xml | 2 +-
yuthon_issue/models/issue_library.py | 23 ++++++++++++++-----
yuthon_issue/views/issue_library_views.xml | 1 +
5 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/soong_workflow/wizard/soong_workflow_record_delete_wizard.py b/soong_workflow/wizard/soong_workflow_record_delete_wizard.py
index 62d6bae34..9f8077b06 100644
--- a/soong_workflow/wizard/soong_workflow_record_delete_wizard.py
+++ b/soong_workflow/wizard/soong_workflow_record_delete_wizard.py
@@ -21,6 +21,12 @@ class SoongWorkflowRecordDeleteWizard(models.TransientModel):
workflow_record = self.env["soong.workflow.record"].sudo().search([("id", "=", record.id)], limit=1)
if not workflow_record:
continue
+ if workflow_record.res_model == "issue.approval":
+ issue_id = self.env["issue.approval"].sudo().search([("id", "=", workflow_record.res_id)], limit=1)
+ issue_library_id = self.env["issue.library"].sudo().search([("issue_approval_id", "=", issue_id.id)], limit=1)
+ if issue_library_id:
+ issue_library_id.revoke()
+
# 删除假期额度里面的对应的流程记录
related_detail_models = [
'vacation.leave.line',
diff --git a/yuthon_hr_employee_approval/models/contract_review_approval.py b/yuthon_hr_employee_approval/models/contract_review_approval.py
index 092a8ce85..6802706bf 100644
--- a/yuthon_hr_employee_approval/models/contract_review_approval.py
+++ b/yuthon_hr_employee_approval/models/contract_review_approval.py
@@ -9,7 +9,7 @@ class ContractReviewApproval(models.Model):
code = fields.Char(string="编号",
default=lambda self: self.env['ir.sequence'].next_by_code('contract_review_approval_code'))
name = fields.Char(string='合同名称')
- user_id = fields.Many2one('res.users', string='合同经办人')
+ user_id = fields.Many2one('res.users', string='合同经办人', default=lambda self: self.env.user)
is_issues = fields.Boolean(string='是否上会')
issues_result = fields.Html(string="会议结果")
related_issues_id = fields.Many2one('issue.library', string="关联议题")
diff --git a/yuthon_hr_employee_approval/views/contract_review_approval_views.xml b/yuthon_hr_employee_approval/views/contract_review_approval_views.xml
index cdfa0e43f..6e4fe65ee 100644
--- a/yuthon_hr_employee_approval/views/contract_review_approval_views.xml
+++ b/yuthon_hr_employee_approval/views/contract_review_approval_views.xml
@@ -46,7 +46,7 @@
-
+
diff --git a/yuthon_issue/models/issue_library.py b/yuthon_issue/models/issue_library.py
index d840f30fa..70e86bd4a 100644
--- a/yuthon_issue/models/issue_library.py
+++ b/yuthon_issue/models/issue_library.py
@@ -115,15 +115,26 @@ class IssueLibrary(models.Model):
specifics_list.append(line.issue_approval_decision_id.specifics)
dec.approval_decision_sequence = ';'.join(specifics_list) if specifics_list else ''
+ def revoke(self):
+ self.write({'issue_state': 'draft'})
+ if self.issue_approval_id:
+ issue_line_records = self.env['issue.approval.line'].search([
+ ('issue_approval_id', '=', self.issue_approval_id.id)
+ ])
+ if issue_line_records:
+ issue_line_records.unlink()
+ workflow_id = self.env['workflow'].search([('res_model', '=', 'issue.approval'),
+ ('res_id', '=', self.issue_approval_id.id)], limit=1)
+ if workflow_id:
+ workflow_id.sudo().unlink()
+ self.issue_approval_id.unlink()
+
+
def all_issue_pull(self):
issue_active_ids = self.env["issue.library"].browse(self._context.get('active_ids', self._context.get('active_id')))
- if not issue_active_ids:
- if self.issue_state != 'draft':
+ for i in issue_active_ids:
+ if i.issue_state != 'draft':
raise UserError("当前状态不允许提交")
- else:
- for i in issue_active_ids:
- if i.issue_state != 'draft':
- raise UserError("当前状态不允许提交")
form_id = self.env.ref("yuthon_issue.issue_library_approval_form").id
issue_decision_lines = []
specifics_list = []
diff --git a/yuthon_issue/views/issue_library_views.xml b/yuthon_issue/views/issue_library_views.xml
index 913c69e7a..c2c2ab0de 100644
--- a/yuthon_issue/views/issue_library_views.xml
+++ b/yuthon_issue/views/issue_library_views.xml
@@ -29,6 +29,7 @@
+
From 00e7f6aa4516f29000e3d1c9bd637a0af23e5f55 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: Sun, 28 Dec 2025 15:40:40 +0800
Subject: [PATCH 04/12] =?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_issue/models/issue_library.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/yuthon_issue/models/issue_library.py b/yuthon_issue/models/issue_library.py
index 70e86bd4a..40c1fe185 100644
--- a/yuthon_issue/models/issue_library.py
+++ b/yuthon_issue/models/issue_library.py
@@ -123,7 +123,7 @@ class IssueLibrary(models.Model):
])
if issue_line_records:
issue_line_records.unlink()
- workflow_id = self.env['workflow'].search([('res_model', '=', 'issue.approval'),
+ workflow_id = self.env['soong.workflow.record'].search([('res_model', '=', 'issue.approval'),
('res_id', '=', self.issue_approval_id.id)], limit=1)
if workflow_id:
workflow_id.sudo().unlink()
From fa06e492f81a26e19e05a68b6ad8af6a3dac38b5 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: Sun, 28 Dec 2025 15:47:44 +0800
Subject: [PATCH 05/12] =?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
---
.../wizard/soong_workflow_record_delete_wizard.py | 9 ++++++++-
yuthon_issue/models/issue_library.py | 2 +-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/soong_workflow/wizard/soong_workflow_record_delete_wizard.py b/soong_workflow/wizard/soong_workflow_record_delete_wizard.py
index 9f8077b06..7d363086a 100644
--- a/soong_workflow/wizard/soong_workflow_record_delete_wizard.py
+++ b/soong_workflow/wizard/soong_workflow_record_delete_wizard.py
@@ -23,9 +23,16 @@ class SoongWorkflowRecordDeleteWizard(models.TransientModel):
continue
if workflow_record.res_model == "issue.approval":
issue_id = self.env["issue.approval"].sudo().search([("id", "=", workflow_record.res_id)], limit=1)
+ issue_line_records = self.env['issue.approval.line'].search([
+ ('issue_approval_id', '=', issue_id.id)
+ ])
+ if issue_line_records:
+ issue_line_records.unlink()
issue_library_id = self.env["issue.library"].sudo().search([("issue_approval_id", "=", issue_id.id)], limit=1)
if issue_library_id:
- issue_library_id.revoke()
+ issue_library_id.write({'issue_state': 'draft'})
+ issue_id.sudo().unlink()
+
# 删除假期额度里面的对应的流程记录
related_detail_models = [
diff --git a/yuthon_issue/models/issue_library.py b/yuthon_issue/models/issue_library.py
index 40c1fe185..1eb36cd6b 100644
--- a/yuthon_issue/models/issue_library.py
+++ b/yuthon_issue/models/issue_library.py
@@ -124,7 +124,7 @@ class IssueLibrary(models.Model):
if issue_line_records:
issue_line_records.unlink()
workflow_id = self.env['soong.workflow.record'].search([('res_model', '=', 'issue.approval'),
- ('res_id', '=', self.issue_approval_id.id)], limit=1)
+ ('res_id', '=', self.issue_approval_id.id)], limit=1)
if workflow_id:
workflow_id.sudo().unlink()
self.issue_approval_id.unlink()
From f64f1b84c9c26e1a90dd0ea54faf2ead6a282f1b 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: Sun, 28 Dec 2025 15:53:22 +0800
Subject: [PATCH 06/12] =?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_record_delete_wizard.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/soong_workflow/wizard/soong_workflow_record_delete_wizard.py b/soong_workflow/wizard/soong_workflow_record_delete_wizard.py
index 7d363086a..a5aa9a245 100644
--- a/soong_workflow/wizard/soong_workflow_record_delete_wizard.py
+++ b/soong_workflow/wizard/soong_workflow_record_delete_wizard.py
@@ -31,7 +31,6 @@ class SoongWorkflowRecordDeleteWizard(models.TransientModel):
issue_library_id = self.env["issue.library"].sudo().search([("issue_approval_id", "=", issue_id.id)], limit=1)
if issue_library_id:
issue_library_id.write({'issue_state': 'draft'})
- issue_id.sudo().unlink()
# 删除假期额度里面的对应的流程记录
From 7621160283602768caa95d89b8c61771d57c6e3c 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: Sun, 28 Dec 2025 16:15:31 +0800
Subject: [PATCH 07/12] =?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_record_delete_wizard.py | 1 +
.../data/abnormal_time_data.xml | 13 ++++++++++
.../models/yuthon_hr_employee.py | 9 +++++++
.../models/contract_review_approval.py | 3 ---
.../views/contract_review_approval_views.xml | 4 ---
yuthon_property/data/yuthon_new_property.xml | 26 +++++++++++++++++++
.../models/property_meter_archives.py | 10 ++++++-
.../models/property_meter_water.py | 9 +++++++
8 files changed, 67 insertions(+), 8 deletions(-)
diff --git a/soong_workflow/wizard/soong_workflow_record_delete_wizard.py b/soong_workflow/wizard/soong_workflow_record_delete_wizard.py
index a5aa9a245..e4e1043ef 100644
--- a/soong_workflow/wizard/soong_workflow_record_delete_wizard.py
+++ b/soong_workflow/wizard/soong_workflow_record_delete_wizard.py
@@ -21,6 +21,7 @@ class SoongWorkflowRecordDeleteWizard(models.TransientModel):
workflow_record = self.env["soong.workflow.record"].sudo().search([("id", "=", record.id)], limit=1)
if not workflow_record:
continue
+ # 议题状态恢复
if workflow_record.res_model == "issue.approval":
issue_id = self.env["issue.approval"].sudo().search([("id", "=", workflow_record.res_id)], limit=1)
issue_line_records = self.env['issue.approval.line'].search([
diff --git a/yuthon_hr_employee/data/abnormal_time_data.xml b/yuthon_hr_employee/data/abnormal_time_data.xml
index c6a475226..67fc58bc8 100644
--- a/yuthon_hr_employee/data/abnormal_time_data.xml
+++ b/yuthon_hr_employee/data/abnormal_time_data.xml
@@ -42,5 +42,18 @@
-1
+
+ 定时任务:更新工会会员
+
+ code
+ model.update_trade_union()
+
+
+ 1
+ months
+
+ -1
+
+
diff --git a/yuthon_hr_employee/models/yuthon_hr_employee.py b/yuthon_hr_employee/models/yuthon_hr_employee.py
index 9fc7fd241..444d9b35a 100644
--- a/yuthon_hr_employee/models/yuthon_hr_employee.py
+++ b/yuthon_hr_employee/models/yuthon_hr_employee.py
@@ -253,6 +253,15 @@ class YuthonHrEmployee(models.Model):
('divorced', 'Divorced')
], string='Marital Status', groups="hr.group_hr_user", default='single', tracking=True)
+ def update_trade_union(self):
+ records = self.env['hr.employee'].search([('is_membership', '=', True)])
+ for record in records:
+ if record.contract_id.termination_date:
+ if record.contract_id.termination_date <= date.today() + timedelta(days=8):
+ record.is_membership = False
+ if record.contract_id.date_end <= date.today() + timedelta(days=8):
+ record.is_membership = False
+
@api.depends('date_end')
def _compute_end_comparison(self):
for record in self:
diff --git a/yuthon_hr_employee_approval/models/contract_review_approval.py b/yuthon_hr_employee_approval/models/contract_review_approval.py
index 6802706bf..adf6e1f8e 100644
--- a/yuthon_hr_employee_approval/models/contract_review_approval.py
+++ b/yuthon_hr_employee_approval/models/contract_review_approval.py
@@ -23,9 +23,6 @@ class ContractReviewApproval(models.Model):
work_end = fields.Boolean(string="结束")
contract_type = fields.Many2one('yuthon.contract.type', string="合同类型")
formation_method = fields.Many2one('yuthon.contract.type', string="形成方式")
- submitting_unit = fields.Char(string="送审单位")
- sign_date = fields.Date(string="合同签订日期")
- performance_term_day = fields.Integer(string='履约期限')
def _get_default_name_title(self):
return self._description if self._description else self._name
diff --git a/yuthon_hr_employee_approval/views/contract_review_approval_views.xml b/yuthon_hr_employee_approval/views/contract_review_approval_views.xml
index 6e4fe65ee..5d67a19e1 100644
--- a/yuthon_hr_employee_approval/views/contract_review_approval_views.xml
+++ b/yuthon_hr_employee_approval/views/contract_review_approval_views.xml
@@ -49,13 +49,9 @@
-
-
-
-
diff --git a/yuthon_property/data/yuthon_new_property.xml b/yuthon_property/data/yuthon_new_property.xml
index 45f249011..9ab1c244e 100644
--- a/yuthon_property/data/yuthon_new_property.xml
+++ b/yuthon_property/data/yuthon_new_property.xml
@@ -40,5 +40,31 @@
-1
+
+ 定时任务:更新电表停用状态
+
+ code
+ model.update_ele_state
+
+
+ 1
+ months
+
+ -1
+
+
+
+ 定时任务:更新水表停用状态
+
+ code
+ model.update_water_state
+
+
+ 1
+ months
+
+ -1
+
+
\ No newline at end of file
diff --git a/yuthon_property/models/property_meter_archives.py b/yuthon_property/models/property_meter_archives.py
index bc5de00f5..ced0f9340 100644
--- a/yuthon_property/models/property_meter_archives.py
+++ b/yuthon_property/models/property_meter_archives.py
@@ -1,5 +1,5 @@
from email.policy import default
-from datetime import datetime
+from datetime import datetime, timedelta, date
from odoo import models, fields, api
from odoo.exceptions import UserError, ValidationError
@@ -39,6 +39,14 @@ class PropertyMeterArchives(models.Model):
state = fields.Selection([("reading", "已抄"), ("unreading", "未抄")], string="抄表状态", default="unreading")
+ def update_ele_state(self):
+ current_date = fields.Date.today() + timedelta(hours=8)
+ records = self.env["property.meter.archives"].search([])
+ for record in records:
+ if record.end_time:
+ if current_date >= record.end_time:
+ record.archives_state = "stop"
+
def delete_data(self):
archives_ids = self.env["property.meter.archives"].browse(
self._context.get('active_ids', self._context.get('active_id')))
diff --git a/yuthon_property/models/property_meter_water.py b/yuthon_property/models/property_meter_water.py
index 2f26ec730..b89ac5e77 100644
--- a/yuthon_property/models/property_meter_water.py
+++ b/yuthon_property/models/property_meter_water.py
@@ -1,6 +1,7 @@
from odoo import models, fields, api
from odoo.exceptions import UserError, ValidationError
from datetime import datetime
+from datetime import datetime, timedelta, date
class PropertyElectricReading(models.Model):
@@ -53,6 +54,14 @@ class PropertyMeterWater(models.Model):
)
remarks = fields.Text(string="备注")
+ def update_water_state(self):
+ current_date = fields.Date.today() + timedelta(hours=8)
+ records = self.env["property.meter.water"].search([])
+ for record in records:
+ if record.end_time:
+ if current_date >= record.end_time:
+ record.water_state = "stop"
+
def water_task(self):
current_date = fields.Date.today()
current_date = current_date.replace(day=15)
From 9d5cb888c32e45f1b87ce1993c00d8bf8f381a98 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: Sun, 28 Dec 2025 16:25:11 +0800
Subject: [PATCH 08/12] =?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/contract_review_approval.py | 4 ++++
.../views/contract_review_approval_views.xml | 1 +
yuthon_property/data/yuthon_new_property.xml | 4 ++--
yuthon_trade/views/yuthon_business_approval_viwes.xml | 8 ++++----
4 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/yuthon_hr_employee_approval/models/contract_review_approval.py b/yuthon_hr_employee_approval/models/contract_review_approval.py
index adf6e1f8e..df8920d11 100644
--- a/yuthon_hr_employee_approval/models/contract_review_approval.py
+++ b/yuthon_hr_employee_approval/models/contract_review_approval.py
@@ -16,6 +16,10 @@ class ContractReviewApproval(models.Model):
department_id = fields.Many2one('hr.department', string='送审部门')
amount = fields.Float(string='合同金额')
remarks = fields.Text(string='情况说明')
+ purchase_type = fields.Selection(
+ [('fixed', '固定资产'), ('low', '低值易耗'), ('service', '服务'), ('day', '日常消耗品')],
+ string="采购类型", required=True, default='fixed')
+
documents_ids = fields.Many2many('ir.attachment', string="附件")
urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度',
default='normal')
diff --git a/yuthon_hr_employee_approval/views/contract_review_approval_views.xml b/yuthon_hr_employee_approval/views/contract_review_approval_views.xml
index 5d67a19e1..b1f3e9283 100644
--- a/yuthon_hr_employee_approval/views/contract_review_approval_views.xml
+++ b/yuthon_hr_employee_approval/views/contract_review_approval_views.xml
@@ -51,6 +51,7 @@
+
diff --git a/yuthon_property/data/yuthon_new_property.xml b/yuthon_property/data/yuthon_new_property.xml
index 9ab1c244e..72ec96269 100644
--- a/yuthon_property/data/yuthon_new_property.xml
+++ b/yuthon_property/data/yuthon_new_property.xml
@@ -44,7 +44,7 @@
定时任务:更新电表停用状态
code
- model.update_ele_state
+ model.update_ele_state()
1
@@ -57,7 +57,7 @@
定时任务:更新水表停用状态
code
- model.update_water_state
+ model.update_water_state()
1
diff --git a/yuthon_trade/views/yuthon_business_approval_viwes.xml b/yuthon_trade/views/yuthon_business_approval_viwes.xml
index 1a53f58e6..041dde8f3 100644
--- a/yuthon_trade/views/yuthon_business_approval_viwes.xml
+++ b/yuthon_trade/views/yuthon_business_approval_viwes.xml
@@ -46,13 +46,13 @@
-
+
+
+
+
-
-
-
From aeab8d46680595bf3735e2ff503c3020015f107f 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: Sun, 28 Dec 2025 17:07:57 +0800
Subject: [PATCH 09/12] =?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
---
.../views/soong_workflow_record.xml | 2 +-
.../data/abnormal_time_data.xml | 13 ----------
yuthon_property/data/yuthon_new_property.xml | 26 -------------------
3 files changed, 1 insertion(+), 40 deletions(-)
diff --git a/soong_workflow/views/soong_workflow_record.xml b/soong_workflow/views/soong_workflow_record.xml
index cbbca6feb..d98703d81 100644
--- a/soong_workflow/views/soong_workflow_record.xml
+++ b/soong_workflow/views/soong_workflow_record.xml
@@ -128,7 +128,7 @@
-
+
diff --git a/yuthon_hr_employee/data/abnormal_time_data.xml b/yuthon_hr_employee/data/abnormal_time_data.xml
index 67fc58bc8..c6a475226 100644
--- a/yuthon_hr_employee/data/abnormal_time_data.xml
+++ b/yuthon_hr_employee/data/abnormal_time_data.xml
@@ -42,18 +42,5 @@
-1
-
- 定时任务:更新工会会员
-
- code
- model.update_trade_union()
-
-
- 1
- months
-
- -1
-
-
diff --git a/yuthon_property/data/yuthon_new_property.xml b/yuthon_property/data/yuthon_new_property.xml
index 72ec96269..45f249011 100644
--- a/yuthon_property/data/yuthon_new_property.xml
+++ b/yuthon_property/data/yuthon_new_property.xml
@@ -40,31 +40,5 @@
-1
-
- 定时任务:更新电表停用状态
-
- code
- model.update_ele_state()
-
-
- 1
- months
-
- -1
-
-
-
- 定时任务:更新水表停用状态
-
- code
- model.update_water_state()
-
-
- 1
- months
-
- -1
-
-
\ No newline at end of file
From c5e5ad3ad3a93e9434130a94feb1c0249c607d4a 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: Sun, 28 Dec 2025 17:13:20 +0800
Subject: [PATCH 10/12] =?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/views/soong_workflow_record.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/soong_workflow/views/soong_workflow_record.xml b/soong_workflow/views/soong_workflow_record.xml
index d98703d81..0381203ed 100644
--- a/soong_workflow/views/soong_workflow_record.xml
+++ b/soong_workflow/views/soong_workflow_record.xml
@@ -128,7 +128,7 @@
-
+
From d9c025c2d31b257cbbc7087b6ec5cf44e2580727 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: Sun, 28 Dec 2025 19:38:40 +0800
Subject: [PATCH 11/12] =?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/__manifest__.py | 1 +
soong_workflow/models/soong_workflow.py | 14 ++++++
soong_workflow/models/soong_workflow_mixin.py | 6 +--
soong_workflow/models/soong_workflow_node.py | 1 +
soong_workflow/security/ir.model.access.csv | 4 +-
.../views/soong_workflow_node_views.xml | 1 +
soong_workflow/views/soong_workflow_views.xml | 7 +++
soong_workflow/wizard/__init__.py | 1 +
.../wizard/change_opinions_wizard.py | 22 ++++++++++
.../wizard/change_opinions_wizard_views.xml | 21 +++++++++
.../models/inherit_hr_employee.py | 2 +-
yuthon_issue/models/issue_library.py | 44 ++++++++++++++++++-
yuthon_issue/views/issue_library_views.xml | 12 +++--
13 files changed, 126 insertions(+), 10 deletions(-)
create mode 100644 soong_workflow/wizard/change_opinions_wizard.py
create mode 100644 soong_workflow/wizard/change_opinions_wizard_views.xml
diff --git a/soong_workflow/__manifest__.py b/soong_workflow/__manifest__.py
index da0bcdb5b..c1f380cbc 100644
--- a/soong_workflow/__manifest__.py
+++ b/soong_workflow/__manifest__.py
@@ -38,6 +38,7 @@
"wizard/soong_workflow_apostille_ok_wizard_view.xml",
"wizard/soong_workflow_record_revoke_wizard_view.xml",
"wizard/soong_workflow_record_delete_wizard_view.xml",
+ 'wizard/change_opinions_wizard_views.xml',
"templates/soong_workflow_templates.xml",
"views/menuitem.xml",
],
diff --git a/soong_workflow/models/soong_workflow.py b/soong_workflow/models/soong_workflow.py
index 35ff97155..89dab4266 100644
--- a/soong_workflow/models/soong_workflow.py
+++ b/soong_workflow/models/soong_workflow.py
@@ -60,6 +60,20 @@ class SoongWorkflow(models.Model):
employee_ids = fields.Many2many('hr.employee', string="人员")
role_ids = fields.Many2many('soong.user.role', 'soong_workflow_role_rel', 'workflow_id', 'user_role_id', string="角色")
+ def change_opinions_wizard(self):
+ soong_ids = self.env["soong.workflow"].browse(
+ self._context.get('active_ids', self._context.get('active_id')))
+ return {
+ 'name': '变更意见',
+ 'type': 'ir.actions.act_window',
+ 'view_mode': 'form',
+ 'res_model': 'change.opinions.wizard',
+ 'target': 'new',
+ 'context': {
+ 'default_soong_ids': [(6, 0, soong_ids.ids)],
+ }
+ }
+
@api.onchange('is_ease')
def _onchange_is_ease(self):
target_value = not self.is_ease
diff --git a/soong_workflow/models/soong_workflow_mixin.py b/soong_workflow/models/soong_workflow_mixin.py
index 98ee110b1..c11c71f58 100644
--- a/soong_workflow/models/soong_workflow_mixin.py
+++ b/soong_workflow/models/soong_workflow_mixin.py
@@ -442,9 +442,9 @@ class SoongWorkflowMixin(models.AbstractModel):
is_supervising = False
if self._module in ['yuthon_official']:
is_supervising = self.is_supervising
- is_first_node = (self_state == 0)
- if is_first_node:
- comment_note_id = self.env['soong.note'].search([('name', '=', '妥否,呈领导审批。')], limit=1).id
+
+ if btn_rec.node_id.comment_id:
+ comment_note_id = btn_rec.node_id.comment_id.id
else:
comment_note_id = False
return {
diff --git a/soong_workflow/models/soong_workflow_node.py b/soong_workflow/models/soong_workflow_node.py
index 2762bcb3d..18f5274fd 100644
--- a/soong_workflow/models/soong_workflow_node.py
+++ b/soong_workflow/models/soong_workflow_node.py
@@ -88,6 +88,7 @@ class SoongWorkflowNode(models.Model):
employee_ids = fields.Many2many('hr.employee', string='抄送/传阅人员')
is_end = fields.Boolean(string="结束", default=False)
department_id = fields.Many2many('hr.department', string='部门转入范围')
+ comment_id = fields.Many2one('soong.note', string="固定意见")
approval_concatenation = fields.Selection([('chuan', '串申'), ('bing', '并申')], string="审批形式", default="bing",
help='并:任何人均给意见,最后一个完成的人转交到下一节点.'
'串:都会收到消息,但任意一个人转交后,即到下一节点,其他人将不再显示,相当于收回.')
diff --git a/soong_workflow/security/ir.model.access.csv b/soong_workflow/security/ir.model.access.csv
index 997e0429c..f2349e69d 100644
--- a/soong_workflow/security/ir.model.access.csv
+++ b/soong_workflow/security/ir.model.access.csv
@@ -47,4 +47,6 @@ access_soong_workflow_record_revoke_wizard,soong_workflow_record_revoke_wizard,m
access_soong_workflow_line,soong_workflow_line,model_soong_workflow_line,soong_workflow.group_soong_workflow_user,1,1,1,1
access_project_project_line,project_project_line,model_project_project_line,soong_workflow.group_soong_workflow_user,1,1,1,1
access_soong_bounced_wizard,soong_bounced_wizard,model_soong_bounced_wizard,base.group_user,1,1,1,1
-access_workflow_line_wizard,workflow_line_wizard,model_workflow_line_wizard,soong_workflow.group_soong_workflow_user,1,1,1,1
\ No newline at end of file
+access_workflow_line_wizard,workflow_line_wizard,model_workflow_line_wizard,soong_workflow.group_soong_workflow_user,1,1,1,1
+
+access_change_opinions_wizard,change_opinions_wizard,model_change_opinions_wizard,soong_workflow.group_soong_workflow_user,1,1,1,1
\ No newline at end of file
diff --git a/soong_workflow/views/soong_workflow_node_views.xml b/soong_workflow/views/soong_workflow_node_views.xml
index d61c64225..235244391 100644
--- a/soong_workflow/views/soong_workflow_node_views.xml
+++ b/soong_workflow/views/soong_workflow_node_views.xml
@@ -13,6 +13,7 @@
+
diff --git a/soong_workflow/views/soong_workflow_views.xml b/soong_workflow/views/soong_workflow_views.xml
index b75b2807d..daef6f356 100644
--- a/soong_workflow/views/soong_workflow_views.xml
+++ b/soong_workflow/views/soong_workflow_views.xml
@@ -115,4 +115,11 @@
soong.workflow
tree,form,search
+
+ 变更意见
+
+
+ code
+ action = model.change_opinions_wizard()
+
diff --git a/soong_workflow/wizard/__init__.py b/soong_workflow/wizard/__init__.py
index 4dc337751..5cef6345a 100644
--- a/soong_workflow/wizard/__init__.py
+++ b/soong_workflow/wizard/__init__.py
@@ -9,5 +9,6 @@ from . import soong_workflow_record_revoke_wizard
from . import role_group_wizard
from . import workflow_line_wizard
from . import soong_bounced_wizard
+from . import change_opinions_wizard
diff --git a/soong_workflow/wizard/change_opinions_wizard.py b/soong_workflow/wizard/change_opinions_wizard.py
new file mode 100644
index 000000000..bef615b69
--- /dev/null
+++ b/soong_workflow/wizard/change_opinions_wizard.py
@@ -0,0 +1,22 @@
+from odoo import fields, models, api
+from odoo.exceptions import UserError, ValidationError
+from datetime import datetime, date, time, timedelta
+
+
+class ChangeOpinionsWizard(models.Model):
+ _name = 'change.opinions.wizard'
+ _description = '变更意见'
+
+ node_name = fields.Char(string="节点名称")
+ comment_id = fields.Many2one('soong.note', string="意见")
+ soong_ids = fields.Many2many('soong.workflow')
+
+ def confirm(self):
+ for soong in self.soong_ids:
+ for node in soong.node_ids:
+ if node.name == self.node_name:
+ node.comment_id = self.comment_id
+
+
+
+
diff --git a/soong_workflow/wizard/change_opinions_wizard_views.xml b/soong_workflow/wizard/change_opinions_wizard_views.xml
new file mode 100644
index 000000000..b479a81be
--- /dev/null
+++ b/soong_workflow/wizard/change_opinions_wizard_views.xml
@@ -0,0 +1,21 @@
+
+
+
+ 变更意见
+ change.opinions.wizard
+ form
+
+
+
+
+
\ No newline at end of file
diff --git a/yuthon_hr_employee_approval/models/inherit_hr_employee.py b/yuthon_hr_employee_approval/models/inherit_hr_employee.py
index 88890bcff..69e501b10 100644
--- a/yuthon_hr_employee_approval/models/inherit_hr_employee.py
+++ b/yuthon_hr_employee_approval/models/inherit_hr_employee.py
@@ -19,7 +19,7 @@ class YuthonHrEmployee(models.Model):
"views": [[form_id, "form"]],
"context":{
'default_employee_id': employee.id,
- 'default_phone': employee.work_phone,
+ 'default_phone': employee.mobile_phone,
'default_job_id': employee.job_id.id,
'default_structure_id': employee.contract_id.structure_type_id.id if employee.contract_id else False,
'default_onboarding_date': employee.entry_date,
diff --git a/yuthon_issue/models/issue_library.py b/yuthon_issue/models/issue_library.py
index 1eb36cd6b..7a7b70cdd 100644
--- a/yuthon_issue/models/issue_library.py
+++ b/yuthon_issue/models/issue_library.py
@@ -60,6 +60,48 @@ class IssueLibrary(models.Model):
member_of_department = fields.Boolean("是否是本部门数据", compute='_compute_part_of_department',
search='_search_part_of_department')
+ is_passed = fields.Selection([('',''), ('pass', '通过'), ('reject', '未通过')])
+ is_push_party = fields.Boolean(string="党推送")
+ is_push_class = fields.Boolean(string="班子推送")
+ is_push_boss = fields.Boolean(string="董事推送")
+
+ def correction(self):
+ for rec in self:
+ menu_id = self.env['ir.ui.menu'].search([('name', '=', '我的议题')])
+ url = f'https://oa.thtzjt.com/web#id={self.id}&cids=2&action={menu_id.action.id}&model=yuthon.notice&view_type=list&menu_id={menu_id.id}'
+ self.sudo().env["wecom.apps"].sync_send_message_textcard(category='oa',
+ user_id=rec.employee_id.wecom_userid,
+ title="议题修正",
+ description="您有待修正的议题,请尽快修正",
+ url=url, btntxt="详细信息")
+ return {
+ 'type': 'ir.actions.client',
+ 'tag': 'display_notification',
+ 'params': {
+ 'type': 'success',
+ 'message': '已发送提醒消息',
+ 'sticky': False,
+ }
+ }
+
+ def library_push(self):
+ for rec in self:
+ if rec.is_passed != 'pass':
+ raise UserError("当前状态不允许推送")
+
+ push_update_vals = {}
+ if rec.is_party and rec.is_passed:
+ push_update_vals['is_push_party'] = True
+
+ if rec.is_class and rec.is_passed:
+ push_update_vals['is_push_class'] = True
+
+ if rec.is_boss and rec.is_passed:
+ push_update_vals['is_push_boss'] = True
+
+ if push_update_vals:
+ rec.write(push_update_vals)
+
def add_workflow(self):
return {
'name': '流程添加弹窗',
@@ -238,7 +280,7 @@ class IssueLibrary(models.Model):
def single_meeting_issue(self):
issue = self.env["issue.library"].browse(self.id)
- if issue.state != 'will':
+ if issue.issue_state != 'will':
raise UserError("当前状态不允许上会")
self.write({"issue_state": "on_meet"})
issue_details = [(0, 0, {
diff --git a/yuthon_issue/views/issue_library_views.xml b/yuthon_issue/views/issue_library_views.xml
index c2c2ab0de..eb254e9e0 100644
--- a/yuthon_issue/views/issue_library_views.xml
+++ b/yuthon_issue/views/issue_library_views.xml
@@ -29,6 +29,7 @@
+
@@ -214,6 +215,7 @@
+
@@ -328,7 +330,7 @@
党总支议题库
issue.library
tree,form
- [('is_party', '=', True)]
+ [('is_push_party', '=', True)]
党支委议题库
issue.library
tree,form
- [('is_party', '=', True)]
+ [('is_push_party', '=', True)]
+
@@ -482,7 +485,7 @@
班子会议题库
issue.library
tree,form
- [('is_class', '=', True)]
+ [('is_push_class', '=', True)]
+
@@ -624,7 +628,7 @@
董事会议题库
issue.library
tree,form
- [('is_boss', '=', True)]
+ [('is_push_boss', '=', True)]
\ No newline at end of file