From 2f43ac71001eaa8b040471d4ea920f06effc8433 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: Tue, 20 Jan 2026 15:11:50 +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 --- soong_workflow/models/soong_workflow_mixin.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/soong_workflow/models/soong_workflow_mixin.py b/soong_workflow/models/soong_workflow_mixin.py index 755a4ec4e..362393236 100644 --- a/soong_workflow/models/soong_workflow_mixin.py +++ b/soong_workflow/models/soong_workflow_mixin.py @@ -110,15 +110,15 @@ class SoongWorkflowMixin(models.AbstractModel): next_log = all_sorted_logs[current_log_index + 1] if next_log.approval_state == "0": record.is_back = True - if record._name in ['yuthon.official.incoming.normal', 'yuthon.sub.enterprises']: - current_user_in_logs2 = any(log.done_by.id == self.env.uid for log in record.log_ids2) - organizer_user_in_logs = any(log.done_by.id == self.env.user.id for log in record.log_ids.filtered(lambda l: l.name == '承办')) - all_handling_logs_approval_0 = all(log.approval_state == '0' for log in record.log_ids.filtered(lambda l: l.name == '承办')) - all_logs2_approval_0 = all(log.approval_state == '0' for log in record.log_ids2) - if all_logs2_approval_0 and all_handling_logs_approval_0 and not current_user_in_logs2 and not organizer_user_in_logs: - record.is_back = True - else: - record.is_back = False + if record._name in ['yuthon.official.incoming.normal', 'yuthon.sub.enterprises']: + current_user_in_logs2 = any(log.done_by.id == self.env.uid for log in record.log_ids2) + organizer_user_in_logs = any(log.done_by.id == self.env.user.id for log in record.log_ids.filtered(lambda l: l.name == '承办')) + all_handling_logs_approval_0 = all(log.approval_state == '0' for log in record.log_ids.filtered(lambda l: l.name == '承办')) + all_logs2_approval_0 = all(log.approval_state == '0' for log in record.log_ids2) + if all_logs2_approval_0 and all_handling_logs_approval_0 and not current_user_in_logs2 and not organizer_user_in_logs: + record.is_back = True + else: + record.is_back = False def _compute_is_active(self): current_user_id = self.env.user.id