Merge pull request !12613 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2026-08-13 02:40:18 +00:00
committed by Gitee
@@ -442,7 +442,7 @@ class SoongWorkflowCommentWizard(models.TransientModel):
has_comment = bool(self.comment and self.comment.strip()) has_comment = bool(self.comment and self.comment.strip())
if not has_comment_note and not has_comment: if not has_comment_note and not has_comment:
raise UserError('请填写备注') raise UserError('请填写备注')
if not self.employee_ids: if not self.employee_ids and self.trans_link_id:
raise UserError("必须有转交人员") raise UserError("必须有转交人员")
self_node_id = record_id.workflow_id.node_ids.search( self_node_id = record_id.workflow_id.node_ids.search(
[('name', '=', record_id.state), ('workflow_id', '=', record_id.workflow_id.id)]) [('name', '=', record_id.state), ('workflow_id', '=', record_id.workflow_id.id)])
@@ -1189,7 +1189,7 @@ class SoongWorkflowCommentWizard(models.TransientModel):
# 核心写入:使用删除后的最后一条经办人 # 核心写入:使用删除后的最后一条经办人
self.env['soong.workflow.record'].search([('code', '=', record.code)]).write({ self.env['soong.workflow.record'].search([('code', '=', record.code)]).write({
"employee_ids": [(6, 0, [prev_log.done_by.employee_id.id])], "employee_ids": [(6, 0, [prev_log.done_by.employee_ids.id])],
"users_ids": [(6, 0, done_by_list)] if not has_sign_log else [(3, user_id) for user_id in done_by_list], "users_ids": [(6, 0, done_by_list)] if not has_sign_log else [(3, user_id) for user_id in done_by_list],
'soong_state': 'to_do' 'soong_state': 'to_do'
}) })