From 3d84a1742847c334df2a01d3bee3747badacd1fb Mon Sep 17 00:00:00 2001
From: zhou <123@>
Date: Thu, 1 May 2025 14:50:56 +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
---
room/views/other_meet_employee_views.xml | 4 ++--
.../wizard/soong_workflow_comment_wizard.py | 19 ++++++++++++-------
.../soong_workflow_comment_wizard_view.xml | 1 +
.../views/issue_approval_decision_views.xml | 5 +----
4 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/room/views/other_meet_employee_views.xml b/room/views/other_meet_employee_views.xml
index 36cbc09f0..07bbd1374 100644
--- a/room/views/other_meet_employee_views.xml
+++ b/room/views/other_meet_employee_views.xml
@@ -2,7 +2,7 @@
other.meet.employee.list
- room.room
+ other.meet.employee
@@ -16,7 +16,7 @@
会议室
- room.room
+ other.meet.employee
list
\ No newline at end of file
diff --git a/soong_workflow/wizard/soong_workflow_comment_wizard.py b/soong_workflow/wizard/soong_workflow_comment_wizard.py
index 023d414ce..1ba38d5e8 100644
--- a/soong_workflow/wizard/soong_workflow_comment_wizard.py
+++ b/soong_workflow/wizard/soong_workflow_comment_wizard.py
@@ -22,9 +22,9 @@ class SoongWorkflowCommentWizard(models.TransientModel):
user_role_id = fields.Many2one('soong.user.role', string="角色", compute='_compute_user_role_id', store=True)
node_link_len = fields.Char(string="转交2")
is_supervising = fields.Boolean(string="是否督办")
- comment_note_id = fields.Many2one('soong.note', string="意见", default='妥否,呈领导审批')
+ comment_note_id = fields.Many2one('soong.note', string="常用意见", default='妥否,呈领导审批')
+ comment_note = fields.Char(string="意见", index=True, store=True)
state_list = fields.Char(string="状态列表")
-
record_id = fields.Integer()
trans_link_id = fields.Many2one('trans.link', string='转交节点')
return_link_id = fields.Many2one('trans.link', string='退回节点')
@@ -42,6 +42,11 @@ class SoongWorkflowCommentWizard(models.TransientModel):
string="督办人员", store=True)
is_automatic = fields.Boolean('是否自动匹配')
+ @api.onchange('comment_note_id')
+ def _onchange_comment_note_id(self):
+ if self.comment_note_id:
+ self.comment_note = self.comment_note_id.name
+
@api.depends('user_id.employee_id.user_role_id')
def _compute_user_role_id(self):
for record in self:
@@ -139,10 +144,10 @@ class SoongWorkflowCommentWizard(models.TransientModel):
"node_btn_id": self.node_btn_id.id,
"lase_click_date": fields.Datetime.now(),
"approval_state": "2",
- "comment": self.comment_note_id.name,
+ "comment": self.comment_note,
})
else:
- now_record_obj.write({"comment": self.comment_note_id.name,
+ now_record_obj.write({"comment": self.comment_note,
"approval_state": "2",
"lase_click_date": fields.Datetime.now()})
next_node_id = record_id.workflow_id.node_ids.search([('name', 'ilike', self.trans_link_id.name),
@@ -201,7 +206,7 @@ class SoongWorkflowCommentWizard(models.TransientModel):
next_node_id = next_link.node_from
record_id.log_ids[-1].write({'approval_state': '2',
"lase_click_date": fields.Datetime.now(),
- "comment": self.comment_note_id.name,
+ "comment": self.comment_note,
"node_btn_name": "1"})
# if not self.sudo().env["soong.workflow.log"].search([('node_id', '=', next_node_id.id)]):
self.sudo().env["soong.workflow.log"].create({
@@ -217,7 +222,7 @@ class SoongWorkflowCommentWizard(models.TransientModel):
workflow_record_id.employee_ids = self.employee_ids
return self.node_btn_id.with_context(cx).run()
if self.node_btn_name == '结束':
- record_id.log_ids[-1].comment = self.comment_note_id.name
+ record_id.log_ids[-1].comment = self.comment_note
record_id.log_ids[-1].approval_state = "3"
record_id.log_ids[-1].lase_click_date = fields.Datetime.now()
record_id.work_end = True
@@ -226,7 +231,7 @@ class SoongWorkflowCommentWizard(models.TransientModel):
"node_id": False,})
if self.node_btn_name == "分发":
if self.employee_ids:
- record_id.log_ids[-1].write({"comment": self.comment_note_id.name,
+ record_id.log_ids[-1].write({"comment": self.comment_note,
"approval_state": "2",
"lase_click_date": fields.Datetime.now()})
self.sudo().env["soong.workflow.log"].create({
diff --git a/soong_workflow/wizard/soong_workflow_comment_wizard_view.xml b/soong_workflow/wizard/soong_workflow_comment_wizard_view.xml
index f5c40eb21..db1495643 100644
--- a/soong_workflow/wizard/soong_workflow_comment_wizard_view.xml
+++ b/soong_workflow/wizard/soong_workflow_comment_wizard_view.xml
@@ -10,6 +10,7 @@