diff --git a/gzth_tree_style/__init__.py b/gzth_tree_style/__init__.py new file mode 100644 index 000000000..decf424eb --- /dev/null +++ b/gzth_tree_style/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +# 本模块仅通过 QWeb 模板继承 + SCSS 统一列表样式,无需 Python 模型。 \ No newline at end of file diff --git a/gzth_tree_style/__manifest__.py b/gzth_tree_style/__manifest__.py new file mode 100644 index 000000000..87d6abae8 --- /dev/null +++ b/gzth_tree_style/__manifest__.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +{ + "name": "Tree 全边框样式", + "summary": "统一全边框 Tree 列表样式(全局生效)", + "description": "纯 CSS 模块:对所有列表视图 .o_list_view 施加全边框样式,不改动任何业务逻辑、字段或视图。", + "version": "17.0.1.0.0", + "category": "Technical", + "depends": ["web"], + "assets": { + "web.assets_backend": [ + "gzth_tree_style/static/src/scss/tree_fullborder.scss", + ], + }, + "installable": True, + "application": False, + "license": "LGPL-3", +} diff --git a/gzth_tree_style/models/__init__.py b/gzth_tree_style/models/__init__.py new file mode 100644 index 000000000..11d1d1939 --- /dev/null +++ b/gzth_tree_style/models/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +# 本包已废弃,模块不再加载 models。保留空文件仅为避免目录报错。 \ No newline at end of file diff --git a/gzth_tree_style/models/ir_ui_view.py b/gzth_tree_style/models/ir_ui_view.py new file mode 100644 index 000000000..230e98965 --- /dev/null +++ b/gzth_tree_style/models/ir_ui_view.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +# 已弃用:原后端 _get_view 钩子方案改为 QWeb 模板继承,本文件不再被加载。 diff --git a/gzth_tree_style/static/src/scss/tree_fullborder.scss b/gzth_tree_style/static/src/scss/tree_fullborder.scss new file mode 100644 index 000000000..9477dd333 --- /dev/null +++ b/gzth_tree_style/static/src/scss/tree_fullborder.scss @@ -0,0 +1,37 @@ +// gzth 物业系统统一 Tree 全边框样式(全局生效,作用于所有列表视图) +// 不依赖任何 class 注入或模板继承,直接对 .o_list_view 施加样式。 +.o_list_view { + .o_list_table { + border-collapse: collapse; + border: 2px solid #94a3b8; + background-color: #ffffff; + } + + thead th { + background-color: #dde3ea !important; + color: #0f172a !important; + font-weight: 700 !important; + border: 2px solid #94a3b8 !important; + padding: 11px 14px !important; + text-align: left; + } + + tbody tr.o_data_row { + background-color: #ffffff !important; + } + + tbody tr.o_data_row:nth-child(even) { + background-color: #f1f4f8 !important; + } + + tbody tr.o_data_row:hover { + background-color: #d6e8ff !important; + } + + tbody td { + border: 1px solid #b6c0cc !important; + padding: 10px 14px !important; + color: #0f172a; + font-weight: 500 !important; + } +} diff --git a/gzth_tree_style/views/list_view_template.xml b/gzth_tree_style/views/list_view_template.xml new file mode 100644 index 000000000..7339767a8 --- /dev/null +++ b/gzth_tree_style/views/list_view_template.xml @@ -0,0 +1,8 @@ + + +