添加功能
This commit is contained in:
@@ -527,6 +527,17 @@ class SoongWorkflowCommentWizard(models.TransientModel):
|
||||
for other_node_log in other_node_logs:
|
||||
other_node_log.unlink()
|
||||
|
||||
if getattr(current_node_log, 'stamp_id', False):
|
||||
same_stamp_logs = self.sudo().env["soong.workflow.log"].search(
|
||||
[("model", "=", self.res_model),
|
||||
("res_id", "=", self.res_id),
|
||||
("id", "!=", current_node_log.id),
|
||||
("node_id", "=", self.node_btn_id.node_id.id),
|
||||
("stamp_id", "=", current_node_log.stamp_id.id),
|
||||
("approval_state", "in", ['0', '1']),
|
||||
])
|
||||
same_stamp_logs.unlink()
|
||||
|
||||
# 印章分组审批:模型有 type_stamp_ids 字段且转交目标是「印章管理员」节点
|
||||
record_has_stamps = hasattr(record_id, 'type_stamp_ids') and bool(record_id.type_stamp_ids)
|
||||
is_transfer_to_stamp = self.trans_link_id and self.trans_link_id.name == '印章管理员'
|
||||
|
||||
Reference in New Issue
Block a user