From bdd6ebbb9368e12dc3bb2cb8b64d38d610edbcfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= Date: Tue, 21 Apr 2026 10:32:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_base/__manifest__.py | 1 + yuthon_base/models/__init__.py | 3 ++- yuthon_base/models/system_logs.py | 11 +++++++++++ yuthon_base/security/ir.model.access.csv | 3 ++- yuthon_base/views/menu.xml | 5 +++++ yuthon_base/views/system_logs_views.xml | 20 ++++++++++++++++++++ 6 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 yuthon_base/models/system_logs.py create mode 100644 yuthon_base/views/system_logs_views.xml diff --git a/yuthon_base/__manifest__.py b/yuthon_base/__manifest__.py index 4fc7c3955..d1a2a484a 100644 --- a/yuthon_base/__manifest__.py +++ b/yuthon_base/__manifest__.py @@ -9,6 +9,7 @@ 'data': [ 'security/ir.model.access.csv', 'views/system_version_views.xml', + 'views/system_logs_views.xml', 'views/ir_cron_act_views.xml', 'views/yuthon_timed_tasks_views.xml', 'views/yuthon_timed_tasks_views.xml', diff --git a/yuthon_base/models/__init__.py b/yuthon_base/models/__init__.py index f3bf7120c..190142723 100644 --- a/yuthon_base/models/__init__.py +++ b/yuthon_base/models/__init__.py @@ -6,4 +6,5 @@ from . import ir_cron_act from . import yuthon_timed_tasks from . import yuthon_phone_lottery from . import res_partner -from . import base_month_year \ No newline at end of file +from . import base_month_year +from . import system_logs \ No newline at end of file diff --git a/yuthon_base/models/system_logs.py b/yuthon_base/models/system_logs.py new file mode 100644 index 000000000..a7c2a165d --- /dev/null +++ b/yuthon_base/models/system_logs.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +from odoo import models, fields + + +class SystemLogs(models.Model): + _name = 'system.logs' + _description = '系统日志' + + name = fields.Char(string="标题") + date = fields.Datetime(string="时间") + content = fields.Text(string="内容") diff --git a/yuthon_base/security/ir.model.access.csv b/yuthon_base/security/ir.model.access.csv index b8bfd38af..616f9157b 100644 --- a/yuthon_base/security/ir.model.access.csv +++ b/yuthon_base/security/ir.model.access.csv @@ -5,4 +5,5 @@ access_yuthon_timed_tasks,yuthon.timed.tasks,model_yuthon_timed_tasks,base.group access_users_home_batch_wizard,access_users_home_batch_wizard,model_users_home_batch_wizard,base.group_user,1,1,1,1 access_phone_lottery,phone.lottery,model_phone_lottery,base.group_user,1,1,1,1 access_base_year,base.year,model_base_year,base.group_user,1,1,1,1 -access_base_month,base.month,model_base_month,base.group_user,1,1,1,1 \ No newline at end of file +access_base_month,base.month,model_base_month,base.group_user,1,1,1,1 +access_system_logs,system.logs,model_system_logs,base.group_system,1,1,1,1 \ No newline at end of file diff --git a/yuthon_base/views/menu.xml b/yuthon_base/views/menu.xml index b4d103ee2..fbf2f2236 100644 --- a/yuthon_base/views/menu.xml +++ b/yuthon_base/views/menu.xml @@ -9,6 +9,11 @@ parent="system_version_menu_root_board" action="action_system_version" sequence="1"/> + + + + 系统日志 + system.logs + tree + + + + system.logs.tree + system.logs + + + + + + + + +