From 7cdcd9312337e7931bb5785fbced52c19f781834 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, 21 Jan 2026 14:30:48 +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
---
yuthon_official/models/yuthon_file_processing.py | 16 ++++++++++++----
yuthon_official/models/yuthon_sub_enterprises.py | 15 ++++++++++++---
2 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/yuthon_official/models/yuthon_file_processing.py b/yuthon_official/models/yuthon_file_processing.py
index c1411e0da..5beca599c 100644
--- a/yuthon_official/models/yuthon_file_processing.py
+++ b/yuthon_official/models/yuthon_file_processing.py
@@ -108,17 +108,25 @@ class YuthonFileProcessing(models.Model):
for processing in processing_ids:
processing._compute_workflow()
-
@api.depends_context('uid')
@api.depends('users_ids')
def _compute_is_display(self):
- current_user = self.env.user #
+ current_user = self.env.user
+ is_system_admin = current_user.has_group('base.group_system') or current_user.has_group('base.group_admin')
+ current_user = self.env.user
for record in self:
record._compute_workflow()
- record.is_display = current_user in record.users_ids
+ if is_system_admin:
+ record.is_display = True
+ else:
+ record.is_display = current_user in record.users_ids
def _search_part_of_company(self, operator, value):
- current_user_id = self.env.uid
+ current_user = self.env.user
+ is_system_admin = current_user.has_group('base.group_system') or current_user.has_group('base.group_admin')
+ current_user_id = current_user.id
+ if is_system_admin:
+ return []
if value:
if operator == "=":
return [("users_ids", "in", [current_user_id])]
diff --git a/yuthon_official/models/yuthon_sub_enterprises.py b/yuthon_official/models/yuthon_sub_enterprises.py
index 4a6f3a970..7aa8c3f45 100644
--- a/yuthon_official/models/yuthon_sub_enterprises.py
+++ b/yuthon_official/models/yuthon_sub_enterprises.py
@@ -57,13 +57,22 @@ class YuthonSubEnterprises(models.Model):
@api.depends_context('uid')
@api.depends('users_ids')
def _compute_is_display(self):
- current_user = self.env.user #
+ current_user = self.env.user
+ is_system_admin = current_user.has_group('base.group_system') or current_user.has_group('base.group_admin')
+ current_user = self.env.user
for record in self:
record._compute_workflow()
- record.is_display = current_user in record.users_ids
+ if is_system_admin:
+ record.is_display = True
+ else:
+ record.is_display = current_user in record.users_ids
def _search_part_of_company(self, operator, value):
- current_user_id = self.env.uid
+ current_user = self.env.user
+ is_system_admin = current_user.has_group('base.group_system') or current_user.has_group('base.group_admin')
+ current_user_id = current_user.id
+ if is_system_admin:
+ return []
if value:
if operator == "=":
return [("users_ids", "in", [current_user_id])]
From 58edbf7acc42d180bc6852b975a8fdc97f47861e 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, 21 Jan 2026 14:31:55 +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
---
yuthon_issue/views/issue_boss_approval_views.xml | 2 +-
yuthon_issue/views/issue_class_approval_views.xml | 2 +-
yuthon_issue/views/issue_party_approval_views.xml | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/yuthon_issue/views/issue_boss_approval_views.xml b/yuthon_issue/views/issue_boss_approval_views.xml
index 32128ae28..a02fdea66 100644
--- a/yuthon_issue/views/issue_boss_approval_views.xml
+++ b/yuthon_issue/views/issue_boss_approval_views.xml
@@ -36,12 +36,12 @@
+
-
diff --git a/yuthon_issue/views/issue_class_approval_views.xml b/yuthon_issue/views/issue_class_approval_views.xml
index 5beaa37fe..d4265a398 100644
--- a/yuthon_issue/views/issue_class_approval_views.xml
+++ b/yuthon_issue/views/issue_class_approval_views.xml
@@ -36,12 +36,12 @@
+
-
diff --git a/yuthon_issue/views/issue_party_approval_views.xml b/yuthon_issue/views/issue_party_approval_views.xml
index b29c75485..359be2f7c 100644
--- a/yuthon_issue/views/issue_party_approval_views.xml
+++ b/yuthon_issue/views/issue_party_approval_views.xml
@@ -36,12 +36,12 @@
+
-