From 2a5c51a4c800f53db4c1ffb4b839192a6c79a4d1 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: Wed, 1 Apr 2026 17:03:13 +0800 Subject: [PATCH 1/2] =?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_comment_wizard.py | 13 ++++++++++++- yuthon_trade/models/yuthon_trade_setting.py | 2 +- yuthon_trade/views/yuthon_trade_setting_views.xml | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/soong_workflow/wizard/soong_workflow_comment_wizard.py b/soong_workflow/wizard/soong_workflow_comment_wizard.py index 77b4af08c..ab6bc2ea4 100644 --- a/soong_workflow/wizard/soong_workflow_comment_wizard.py +++ b/soong_workflow/wizard/soong_workflow_comment_wizard.py @@ -203,7 +203,18 @@ class SoongWorkflowCommentWizard(models.TransientModel): continue record_id = self.env[record.res_model].browse(record.res_id) if record.res_model and record.res_id else None for link in record.trans_link_id: - employee_user_role_ids = self._get_approvers_for_link(link, record_id) + if link.name == '盖章人': + stamp_types = record_id.type_stamp_ids + if stamp_types: + user_ids = self.env['res.users'] + for stamp in stamp_types: + user_ids |= stamp.user_ids + if user_ids: + employee_user_role_ids = self.env['hr.employee'].sudo().search([ + ('user_id', 'in', user_ids.ids) + ]) + else: + employee_user_role_ids = self._get_approvers_for_link(link, record_id) workflow_id = link.node_button_id.workflow_id node = workflow_id.node_ids.search([ ('name', '=', link.name), diff --git a/yuthon_trade/models/yuthon_trade_setting.py b/yuthon_trade/models/yuthon_trade_setting.py index c274a1af7..66e0f2ccf 100644 --- a/yuthon_trade/models/yuthon_trade_setting.py +++ b/yuthon_trade/models/yuthon_trade_setting.py @@ -29,7 +29,7 @@ class SealsTypeSetting(models.Model): name = fields.Char(string='名称') scope_setting_id = fields.Many2one('seals.scope.setting', string="用章范围") department_id = fields.Many2one('hr.department', string="部门") - user_id = fields.Many2one('res.users', string="保管人") + user_ids = fields.Many2many('res.users', string="保管人") start_date = fields.Date(string="生效日期", copy=False, default=fields.Date.today()) end_date = fields.Date(string="失效日期") is_effect = fields.Boolean(string="是否生效", compute="_compute_is_effect") diff --git a/yuthon_trade/views/yuthon_trade_setting_views.xml b/yuthon_trade/views/yuthon_trade_setting_views.xml index bbc012d22..725aab14f 100644 --- a/yuthon_trade/views/yuthon_trade_setting_views.xml +++ b/yuthon_trade/views/yuthon_trade_setting_views.xml @@ -35,7 +35,7 @@ - + From c4179441a12531127a23b6b4f22dc71076e26245 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: Wed, 1 Apr 2026 17:04:12 +0800 Subject: [PATCH 2/2] =?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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soong_workflow/wizard/soong_workflow_comment_wizard.py b/soong_workflow/wizard/soong_workflow_comment_wizard.py index ab6bc2ea4..4edb68384 100644 --- a/soong_workflow/wizard/soong_workflow_comment_wizard.py +++ b/soong_workflow/wizard/soong_workflow_comment_wizard.py @@ -203,7 +203,7 @@ class SoongWorkflowCommentWizard(models.TransientModel): continue record_id = self.env[record.res_model].browse(record.res_id) if record.res_model and record.res_id else None for link in record.trans_link_id: - if link.name == '盖章人': + if link.name == '印章管理员': stamp_types = record_id.type_stamp_ids if stamp_types: user_ids = self.env['res.users']