[app_common] v18 file_path

This commit is contained in:
Chill
2024-12-13 16:54:37 +08:00
parent 3149247eb1
commit 448b541824
3 changed files with 6 additions and 5 deletions

View File

@@ -39,7 +39,7 @@
{ {
'name': "odooAi Common Util and Tools,欧度智能基础功能及面板", 'name': "odooAi Common Util and Tools,欧度智能基础功能及面板",
'version': '18.0.24.12.10', 'version': '18.0.24.12.13',
'author': 'odooai.cn', 'author': 'odooai.cn',
'category': 'Extra tools', 'category': 'Extra tools',
'website': 'https://www.odooai.cn', 'website': 'https://www.odooai.cn',

View File

@@ -1,7 +1,8 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from odoo import api, models, tools, SUPERUSER_ID 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 import view_validation
from odoo.tools.view_validation import _relaxng_cache, validate, _validators from odoo.tools.view_validation import _relaxng_cache, validate, _validators
from odoo.tools.safe_eval import safe_eval from odoo.tools.safe_eval import safe_eval
@@ -15,9 +16,9 @@ def app_relaxng(view_type):
if view_type not in _relaxng_cache: if view_type not in _relaxng_cache:
# tree, search 特殊 # tree, search 特殊
if view_type in ['list', '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: 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: with tools.file_open(_file) as frng:
try: try:
relaxng_doc = etree.parse(frng) relaxng_doc = etree.parse(frng)

View File

@@ -4,7 +4,7 @@
<h2 class="oe_slogan">odooAi Common Util and Tools</h2> <h2 class="oe_slogan">odooAi Common Util and Tools</h2>
<h3 class="oe_slogan"> Network and media and base tools </h3> <h3 class="oe_slogan"> Network and media and base tools </h3>
<div class="oe_row"> <div class="oe_row">
<h3>Lastest update: v18.24.12.10</h3> <h3>Lastest update: v18.24.12.13</h3>
<div class="row"> <div class="row">
<img class="oe_demo oe_screenshot img img-fluid" style="max-height: 100%;" src="banner.png"> <img class="oe_demo oe_screenshot img img-fluid" style="max-height: 100%;" src="banner.png">
</div> </div>