Merge pull request !9649 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2026-03-12 10:20:15 +00:00
committed by Gitee
2 changed files with 11 additions and 1 deletions
@@ -160,6 +160,16 @@ class SoongWorkflowMixin(models.AbstractModel):
for record in self:
record.is_confirm = False
record.is_end = False
target_models = ['yuthon.official.incoming.normal', 'yuthon.sub.enterprises']
if record._name in target_models:
chairman_logs = record.log_ids.filtered(
lambda log: '董事长' in (log.name or '')
and log.approval_state in ['0', '1']
)
if chairman_logs:
record.is_end = True
continue
log_ids_domain = [
('done_by', '=', self.env.user.id),
('workflow_id', '=', record.workflow_id.id),
@@ -793,7 +793,7 @@ class SoongWorkflowCommentWizard(models.TransientModel):
})
else:
if workflow_record:
workflow_record.write({
workflow_record.sudo().write({
'approve_state': 'end',
'employee_ids': False,
'node_id': False,