From 448b5418243a85b5f8f7a9047c57e841a30513d2 Mon Sep 17 00:00:00 2001 From: Chill Date: Fri, 13 Dec 2024 16:54:37 +0800 Subject: [PATCH] [app_common] v18 file_path --- app_common/__manifest__.py | 2 +- app_common/models/ir_ui_view.py | 7 ++++--- app_common/static/description/index.html | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app_common/__manifest__.py b/app_common/__manifest__.py index cd4c01bf..69806744 100644 --- a/app_common/__manifest__.py +++ b/app_common/__manifest__.py @@ -39,7 +39,7 @@ { 'name': "odooAi Common Util and Tools,欧度智能基础功能及面板", - 'version': '18.0.24.12.10', + 'version': '18.0.24.12.13', 'author': 'odooai.cn', 'category': 'Extra tools', 'website': 'https://www.odooai.cn', diff --git a/app_common/models/ir_ui_view.py b/app_common/models/ir_ui_view.py index 17162922..16dfb9d5 100644 --- a/app_common/models/ir_ui_view.py +++ b/app_common/models/ir_ui_view.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- from odoo import api, models, tools, SUPERUSER_ID -from odoo.modules.module import get_resource_path +from odoo.tools import file_open +from odoo.tools import misc from odoo.tools import view_validation from odoo.tools.view_validation import _relaxng_cache, validate, _validators from odoo.tools.safe_eval import safe_eval @@ -15,9 +16,9 @@ def app_relaxng(view_type): if view_type not in _relaxng_cache: # tree, search 特殊 if view_type in ['list', 'search']: - _file = get_resource_path('app_common', 'rng', '%s_view.rng' % view_type) + _file = misc.file_path('app_common/rng/%s_view.rng' % view_type) else: - _file = get_resource_path('base', 'rng', '%s_view.rng' % view_type) + _file = misc.file_path('base/rng/%s_view.rng' % view_type) with tools.file_open(_file) as frng: try: relaxng_doc = etree.parse(frng) diff --git a/app_common/static/description/index.html b/app_common/static/description/index.html index 61481fcf..4d705a91 100644 --- a/app_common/static/description/index.html +++ b/app_common/static/description/index.html @@ -4,7 +4,7 @@

odooAi Common Util and Tools

Network and media and base tools

-

Lastest update: v18.24.12.10

+

Lastest update: v18.24.12.13