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 d6c5a2897..405f83748 100644
--- a/yuthon_issue/views/issue_party_approval_views.xml
+++ b/yuthon_issue/views/issue_party_approval_views.xml
@@ -36,6 +36,7 @@
+
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])]