From 41f76ca36465414db7a141604b31e0755d912e29 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: Mon, 26 Jan 2026 17:00:40 +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_official/models/yuthon_file_processing.py | 6 ++++++ yuthon_official/models/yuthon_sub_enterprises.py | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/yuthon_official/models/yuthon_file_processing.py b/yuthon_official/models/yuthon_file_processing.py index 18bb8ddfb..c39c64cf8 100644 --- a/yuthon_official/models/yuthon_file_processing.py +++ b/yuthon_official/models/yuthon_file_processing.py @@ -149,6 +149,12 @@ class YuthonFileProcessing(models.Model): else: return [("users_ids", "in", [current_user_id])] + def get_no_read_count(self): + domain = [ + ('employee_ids1', 'in', self.env.user.employee_id.id), + ] + return self.search_count(domain) + @api.depends('code') def _compute_workflow(self): for record in self: diff --git a/yuthon_official/models/yuthon_sub_enterprises.py b/yuthon_official/models/yuthon_sub_enterprises.py index 5dcc2e985..7b443cc2a 100644 --- a/yuthon_official/models/yuthon_sub_enterprises.py +++ b/yuthon_official/models/yuthon_sub_enterprises.py @@ -87,6 +87,13 @@ class YuthonSubEnterprises(models.Model): else: return [("users_ids", "in", [current_user_id])] + def get_no_read_count(self): + domain = [ + ('employee_ids', 'in', self.env.user.employee_id.id), + ] + return self.search_count(domain) + + @api.depends('code') def _compute_workflow(self): for record in self: