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: