From 6c285d1061278719468dc016c86126d2672c96a3 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Sun, 2 Mar 2025 14:53:11 +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 --- yuthon_notice/models/yuthon_notice.py | 5 ++--- .../views/yuthon_official_incoming_normal_views.xml | 5 +++++ yuthon_official/views/yuthon_official_labor_views.xml | 5 +++++ yuthon_official/views/yuthon_official_party_views.xml | 5 +++++ yuthon_official/views/yuthon_official_views.xml | 6 ++++++ 5 files changed, 23 insertions(+), 3 deletions(-) diff --git a/yuthon_notice/models/yuthon_notice.py b/yuthon_notice/models/yuthon_notice.py index 832af6118..d72396d19 100644 --- a/yuthon_notice/models/yuthon_notice.py +++ b/yuthon_notice/models/yuthon_notice.py @@ -63,10 +63,9 @@ class YuthonNotice(models.Model): department_user_ids = set() for department_id in self.department_ids: department_user_ids.update(get_department_employees(department_id)) - for notice in self: - users = notice.employee_ids.mapped('user_id') + notice.users_role_ids.mapped('user_id') + department_user_ids - notice.users_ids = users + all_users = set(notice.employee_ids.mapped('user_id').ids + notice.users_role_ids.mapped('id') + list(department_user_ids)) + notice.users_ids = [(6, 0, list(all_users))] def get_no_read_count(self): return self.search_count([('is_notice_roger', '=', 'no'), ('notice_state', '=', 'yes')]) diff --git a/yuthon_official/views/yuthon_official_incoming_normal_views.xml b/yuthon_official/views/yuthon_official_incoming_normal_views.xml index b34347045..eb29fce96 100644 --- a/yuthon_official/views/yuthon_official_incoming_normal_views.xml +++ b/yuthon_official/views/yuthon_official_incoming_normal_views.xml @@ -37,6 +37,11 @@ +
+

+ +

+
diff --git a/yuthon_official/views/yuthon_official_labor_views.xml b/yuthon_official/views/yuthon_official_labor_views.xml index 0468f2114..6064ca8d0 100644 --- a/yuthon_official/views/yuthon_official_labor_views.xml +++ b/yuthon_official/views/yuthon_official_labor_views.xml @@ -34,6 +34,11 @@ +
+

+ +

+
diff --git a/yuthon_official/views/yuthon_official_party_views.xml b/yuthon_official/views/yuthon_official_party_views.xml index df1be0738..3656568ae 100644 --- a/yuthon_official/views/yuthon_official_party_views.xml +++ b/yuthon_official/views/yuthon_official_party_views.xml @@ -37,6 +37,11 @@ +
+

+ +

+