diff --git a/app_odoo_customize/__init__.py b/app_odoo_customize/__init__.py
index 493e0ba3..32eadd1c 100644
--- a/app_odoo_customize/__init__.py
+++ b/app_odoo_customize/__init__.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from . import models
+from . import wizard
from . import hooks
from .hooks import pre_init_hook
from .hooks import post_init_hook
diff --git a/app_odoo_customize/__manifest__.py b/app_odoo_customize/__manifest__.py
index 670c7940..60ba9e9e 100644
--- a/app_odoo_customize/__manifest__.py
+++ b/app_odoo_customize/__manifest__.py
@@ -23,7 +23,7 @@
{
'name': 'odoo 16 Customize OEM(Boost, Data reset)',
- 'version': '16.23.05.25',
+ 'version': '16.23.07.31',
'author': 'odooai.cn',
'category': 'Productivity',
'website': 'https://www.odooai.cn',
@@ -55,6 +55,7 @@
'views/ir_views.xml',
'views/ir_module_module_views.xml',
'views/ir_translation_views.xml',
+ 'views/ir_module_addons_path_views.xml',
'views/ir_ui_menu_views.xml',
'views/ir_ui_view_views.xml',
'views/ir_model_fields_views.xml',
diff --git a/app_odoo_customize/i18n/zh_CN.po b/app_odoo_customize/i18n/zh_CN.po
index 8608322d..6fbe80ca 100644
--- a/app_odoo_customize/i18n/zh_CN.po
+++ b/app_odoo_customize/i18n/zh_CN.po
@@ -4,10 +4,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 16.0+e-20230423\n"
+"Project-Id-Version: Odoo Server 16.0+e-20230721\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2023-05-24 13:01+0000\n"
-"PO-Revision-Date: 2023-05-24 13:01+0000\n"
+"POT-Creation-Date: 2023-07-31 09:10+0000\n"
+"PO-Revision-Date: 2023-07-31 09:10+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -88,6 +88,11 @@ msgstr "销售"
msgid "Website And Blog"
msgstr "网站与博客"
+#. module: app_odoo_customize
+#: model_terms:ir.ui.view,arch_db:app_odoo_customize.ir_module_addons_path_form_view
+msgid " Modules "
+msgstr " 模块 "
+
#. module: app_odoo_customize
#: model_terms:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings
msgid "Set to False to hide"
@@ -115,11 +120,30 @@ msgstr "激活开发者模式"
msgid "Activate the developer mode (with assets)"
msgstr "激活开发者模式 (assets)"
+#. module: app_odoo_customize
+#: model:ir.model.fields,field_description:app_odoo_customize.field_ir_module_module__addons_path
+#: model:ir.model.fields,field_description:app_odoo_customize.field_ir_module_module__addons_path_id
+#: model_terms:ir.ui.view,arch_db:app_odoo_customize.app_view_module_filter
+msgid "Addons Path"
+msgstr "模块路径"
+
+#. module: app_odoo_customize
+#: model:ir.actions.act_window,name:app_odoo_customize.action_ir_module_addons_path
+#: model:ir.ui.menu,name:app_odoo_customize.menu_ir_module_addons_path
+msgid "Addons Paths"
+msgstr "模块路径"
+
#. module: app_odoo_customize
#: model_terms:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings
msgid "Apply"
msgstr "应用"
+#. module: app_odoo_customize
+#: model:ir.model.fields.selection,name:app_odoo_customize.selection__res_config_settings__app_navbar_pos_mobile__bottom
+#: model:ir.model.fields.selection,name:app_odoo_customize.selection__res_config_settings__app_navbar_pos_pc__bottom
+msgid "Bottom"
+msgstr "底部"
+
#. module: app_odoo_customize
#: model_terms:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings
msgid "Cancel"
@@ -135,6 +159,11 @@ msgstr "清除会计科目,便于重置"
msgid "Click to set"
msgstr "点击设置"
+#. module: app_odoo_customize
+#: model:ir.model.fields,field_description:app_odoo_customize.field_ir_module_addons_path__color
+msgid "Color"
+msgstr "颜色"
+
#. module: app_odoo_customize
#: model:ir.model,name:app_odoo_customize.model_res_config_settings
msgid "Config Settings"
@@ -145,6 +174,16 @@ msgstr "配置设置"
msgid "Copyright ©"
msgstr "版权所有 ©"
+#. module: app_odoo_customize
+#: model:ir.model.fields,field_description:app_odoo_customize.field_ir_module_addons_path__create_uid
+msgid "Created by"
+msgstr "创建者"
+
+#. module: app_odoo_customize
+#: model:ir.model.fields,field_description:app_odoo_customize.field_ir_module_addons_path__create_date
+msgid "Created on"
+msgstr "创建于"
+
#. module: app_odoo_customize
#: model:ir.actions.act_window,name:app_odoo_customize.action_app_theme_config
#: model:ir.ui.menu,name:app_odoo_customize.menu_app_theme_config
@@ -267,6 +306,11 @@ msgstr "开发者手册链接"
msgid "Developer Manual"
msgstr "开发者手册"
+#. module: app_odoo_customize
+#: model:ir.model.fields,field_description:app_odoo_customize.field_ir_module_addons_path__display_name
+msgid "Display Name"
+msgstr "显示名称"
+
#. module: app_odoo_customize
#. odoo-javascript
#: code:addons/app_odoo_customize/static/src/js/user_menu.js:0
@@ -290,11 +334,31 @@ msgstr "导出翻译"
msgid "HTTP Routing"
msgstr "HTTP 路由"
+#. module: app_odoo_customize
+#: model:ir.model.fields,field_description:app_odoo_customize.field_ir_module_addons_path__id
+msgid "ID"
+msgstr "ID"
+
#. module: app_odoo_customize
#: model:ir.model,name:app_odoo_customize.model_base_language_install
msgid "Install Language"
msgstr "安装语言"
+#. module: app_odoo_customize
+#: model:ir.model.fields,field_description:app_odoo_customize.field_ir_module_addons_path____last_update
+msgid "Last Modified on"
+msgstr "上次修改时间"
+
+#. module: app_odoo_customize
+#: model:ir.model.fields,field_description:app_odoo_customize.field_ir_module_addons_path__write_uid
+msgid "Last Updated by"
+msgstr "最后更新者"
+
+#. module: app_odoo_customize
+#: model:ir.model.fields,field_description:app_odoo_customize.field_ir_module_addons_path__write_date
+msgid "Last Updated on"
+msgstr "最后更新于"
+
#. module: app_odoo_customize
#. odoo-javascript
#: code:addons/app_odoo_customize/static/src/js/user_menu.js:0
@@ -315,9 +379,20 @@ msgstr "可本地更新"
#. module: app_odoo_customize
#: model:ir.model,name:app_odoo_customize.model_ir_module_module
+#: model:ir.model.fields,field_description:app_odoo_customize.field_ir_module_addons_path__module_ids
msgid "Module"
msgstr "模块"
+#. module: app_odoo_customize
+#: model:ir.model.fields,field_description:app_odoo_customize.field_ir_module_addons_path__module_count
+msgid "Module Count"
+msgstr "模块计数"
+
+#. module: app_odoo_customize
+#: model_terms:ir.ui.view,arch_db:app_odoo_customize.ir_module_addons_path_kanban_view
+msgid "Modules"
+msgstr "模块"
+
#. module: app_odoo_customize
#: model:ir.model.fields,field_description:app_odoo_customize.field_res_config_settings__app_account_title
msgid "My Odoo.com Account Title"
@@ -328,6 +403,16 @@ msgstr "我的帐户显示标题"
msgid "My Odoo.com Account Url"
msgstr "我的帐户链接"
+#. module: app_odoo_customize
+#: model:ir.model.fields,field_description:app_odoo_customize.field_res_config_settings__app_navbar_pos_mobile
+msgid "Navbar Mobile"
+msgstr "导航栏移动"
+
+#. module: app_odoo_customize
+#: model:ir.model.fields,field_description:app_odoo_customize.field_res_config_settings__app_navbar_pos_pc
+msgid "Navbar PC"
+msgstr "导航栏电脑"
+
#. module: app_odoo_customize
#: model_terms:ir.ui.view,arch_db:app_odoo_customize.app_view_model_data_search
msgid "No Updatable"
@@ -338,6 +423,16 @@ msgstr "无需更新"
msgid "Odoo Customize Setting"
msgstr "odoo自定义设置"
+#. module: app_odoo_customize
+#: model:ir.model.fields,field_description:app_odoo_customize.field_ir_module_addons_path__path
+msgid "Path"
+msgstr "路径"
+
+#. module: app_odoo_customize
+#: model:ir.model.fields,field_description:app_odoo_customize.field_ir_module_addons_path__path_temp
+msgid "Path Temp"
+msgstr "路径Temp"
+
#. module: app_odoo_customize
#: model_terms:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings
msgid "Please confirm to delete the select data?"
@@ -355,7 +450,7 @@ msgstr "技术支持 odooai.cn"
#: code:addons/app_odoo_customize/static/src/js/user_menu.js:0
#, python-format
msgid "Preferences"
-msgstr ""
+msgstr "偏好"
#. module: app_odoo_customize
#. odoo-javascript
@@ -385,6 +480,11 @@ msgstr "计划任务"
msgid "Setup System Name,which replace Odoo"
msgstr "设定系统名称,代替原 Odoo 字样"
+#. module: app_odoo_customize
+#: model:ir.model.fields,field_description:app_odoo_customize.field_ir_module_addons_path__name
+msgid "Short Name"
+msgstr "简称"
+
#. module: app_odoo_customize
#: model:ir.model.fields,field_description:app_odoo_customize.field_res_config_settings__group_show_author_in_apps
#: model:res.groups,name:app_odoo_customize.group_show_author_in_apps
@@ -489,6 +589,17 @@ msgstr "你选择的翻译语言已更新。但你仍然需要更新相关模块
msgid "Top Menu"
msgstr "顶级菜单"
+#. module: app_odoo_customize
+#: model:ir.model.fields.selection,name:app_odoo_customize.selection__res_config_settings__app_navbar_pos_mobile__top
+#: model:ir.model.fields.selection,name:app_odoo_customize.selection__res_config_settings__app_navbar_pos_pc__top
+msgid "Top(Default)"
+msgstr "顶部(默认)"
+
+#. module: app_odoo_customize
+#: model_terms:ir.ui.view,arch_db:app_odoo_customize.view_app_theme_config_settings
+msgid "UI Config"
+msgstr "用户界面配置"
+
#. module: app_odoo_customize
#: model:ir.model.fields,help:app_odoo_customize.field_res_config_settings__group_show_author_in_apps
msgid "Uncheck to Hide Author and Website in Apps Dashboard"
@@ -524,6 +635,11 @@ msgstr "卸载"
msgid "Uninstall Modules"
msgstr "卸载应用"
+#. module: app_odoo_customize
+#: model:ir.model,name:app_odoo_customize.model_base_module_update
+msgid "Update Module"
+msgstr "更新模块"
+
#. module: app_odoo_customize
#: model_terms:ir.ui.view,arch_db:app_odoo_customize.app_module_view_kanban
msgid "Upgrade"
@@ -579,6 +695,11 @@ msgstr "启用后,会显示在线支持链接"
msgid "When enable,everyone login can see the debug menu"
msgstr "启用后,会显示快速调试菜单"
+#. module: app_odoo_customize
+#: model:ir.model,name:app_odoo_customize.model_ir_module_addons_path
+msgid "ir.module.addons.path"
+msgstr "ir.module.addons.path"
+
#. module: app_odoo_customize
#. odoo-javascript
#: code:addons/app_odoo_customize/static/src/xml/res_config_edition.xml:0
diff --git a/app_odoo_customize/models/__init__.py b/app_odoo_customize/models/__init__.py
index 3c95cea5..4c7df871 100644
--- a/app_odoo_customize/models/__init__.py
+++ b/app_odoo_customize/models/__init__.py
@@ -5,5 +5,6 @@ from . import base_language_install
from . import ir_module_module
from . import web_environment_ribbon_backend
from . import ir_http
+from . import ir_module_addons_path
# from . import ir_ui_view
# from . import ir_ui_menu
diff --git a/app_odoo_customize/models/ir_module_addons_path.py b/app_odoo_customize/models/ir_module_addons_path.py
new file mode 100644
index 00000000..1ef754ba
--- /dev/null
+++ b/app_odoo_customize/models/ir_module_addons_path.py
@@ -0,0 +1,40 @@
+# -*- coding: utf-8 -*-
+
+import random
+from odoo import api, fields, models, modules, tools, _
+
+
+class IrModuleAddonsPath(models.Model):
+ _name = "ir.module.addons.path"
+
+ def _default_bg_color(self):
+ colors = ['#F06050', '#F4A45F', '#F7CD2E', '#6CC1ED', '#EB7E7F', '#5CC482',
+ '#2c8297', '#D8485E', '#9365B8', '#804967', '#475576', ]
+ res = '#FFFFFF'
+ try:
+ res = random.choice(colors)
+ except:
+ pass
+ return res
+
+ name = fields.Char(string='Short Name')
+ path = fields.Char(string='Path')
+ path_temp = fields.Char(string='Path Temp')
+ color = fields.Char(default=_default_bg_color)
+ module_ids = fields.One2many('ir.module.module', 'addons_path_id')
+ module_count = fields.Integer(compute='_compute_module_count')
+
+ def _compute_module_count(self):
+ for rec in self:
+ rec.module_count = len(rec.module_ids)
+
+ def open_apps_view(self):
+ self.ensure_one()
+
+ return {'type': 'ir.actions.act_window',
+ 'name': 'Apps',
+ 'view_mode': 'kanban,tree,form',
+ 'res_model': 'ir.module.module',
+ 'context': {},
+ 'domain': [('addons_path_id', '=', self.id)],
+ }
diff --git a/app_odoo_customize/models/ir_module_module.py b/app_odoo_customize/models/ir_module_module.py
index 8b1a5c74..f397707f 100644
--- a/app_odoo_customize/models/ir_module_module.py
+++ b/app_odoo_customize/models/ir_module_module.py
@@ -4,6 +4,7 @@ from odoo import api, fields, models, modules, tools, _
import operator
+
class IrModule(models.Model):
_inherit = 'ir.module.module'
@@ -15,6 +16,8 @@ class IrModule(models.Model):
# latest_version = fields.Char('Installed Version', readonly=True)
local_updatable = fields.Boolean('Local updatable', compute=False, default=False, store=True)
+ addons_path_id = fields.Many2one('ir.module.addons.path', string='Addons Path', readonly=True)
+ addons_path = fields.Char(string='Addons Path', related='addons_path_id.path', readonly=True)
def module_multi_uninstall(self):
""" Perform the various steps required to uninstall a module completely
diff --git a/app_odoo_customize/security/ir.model.access.csv b/app_odoo_customize/security/ir.model.access.csv
index 4277cb36..607dd696 100644
--- a/app_odoo_customize/security/ir.model.access.csv
+++ b/app_odoo_customize/security/ir.model.access.csv
@@ -1,2 +1,3 @@
-"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
-"access_ir_config_parameter_system","ir_config_parameter_system","base.model_ir_config_parameter","base.group_user",1,0,0,0
\ No newline at end of file
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+access_ir_config_parameter_system,ir_config_parameter_system,base.model_ir_config_parameter,base.group_user,1,0,0,0
+access_ir_module_addons_path_user,ir_module_addons_path_user,app_odoo_customize.model_ir_module_addons_path,base.group_system,1,1,1,1
\ No newline at end of file
diff --git a/app_odoo_customize/views/ir_module_addons_path_views.xml b/app_odoo_customize/views/ir_module_addons_path_views.xml
new file mode 100644
index 00000000..6059b8d2
--- /dev/null
+++ b/app_odoo_customize/views/ir_module_addons_path_views.xml
@@ -0,0 +1,79 @@
+
+
+
+ ir.module.addons.path.tree
+ ir.module.addons.path
+
+
+
+
+
+
+
+
+
+ ir.module.addons.path.form
+ ir.module.addons.path
+
+
+
+
+
+
+ ir.module.addons.path.kanban
+ ir.module.addons.path
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Addons Paths
+ ir.module.addons.path
+ kanban,tree,form
+ {}
+ []
+
+
\ No newline at end of file
diff --git a/app_odoo_customize/views/ir_module_module_views.xml b/app_odoo_customize/views/ir_module_module_views.xml
index 5cd3ca24..2ca3a38e 100644
--- a/app_odoo_customize/views/ir_module_module_views.xml
+++ b/app_odoo_customize/views/ir_module_module_views.xml
@@ -12,6 +12,7 @@
+
hide
@@ -27,6 +28,9 @@
+
+
+
@@ -40,6 +44,12 @@
app_odoo_customize.group_show_author_in_apps
+
+
+
+
+
+
diff --git a/app_odoo_customize/views/ir_ui_menu_views.xml b/app_odoo_customize/views/ir_ui_menu_views.xml
index b91dd30e..d66269f5 100644
--- a/app_odoo_customize/views/ir_ui_menu_views.xml
+++ b/app_odoo_customize/views/ir_ui_menu_views.xml
@@ -54,18 +54,26 @@
sequence="91"
action="base.ir_cron_act"
groups="base.group_system"/>
+
+
diff --git a/app_odoo_customize/wizard/__init__.py b/app_odoo_customize/wizard/__init__.py
new file mode 100644
index 00000000..320aec30
--- /dev/null
+++ b/app_odoo_customize/wizard/__init__.py
@@ -0,0 +1,3 @@
+# -*- coding: utf-8 -*-
+
+from . import base_module_update
diff --git a/app_odoo_customize/wizard/base_module_update.py b/app_odoo_customize/wizard/base_module_update.py
new file mode 100644
index 00000000..4cf9afb6
--- /dev/null
+++ b/app_odoo_customize/wizard/base_module_update.py
@@ -0,0 +1,56 @@
+# -*- coding: utf-8 -*-
+
+import os
+import lxml.html
+import odoo
+import logging
+from odoo import api, fields, models, addons, modules, tools, Command
+from odoo.modules.module import get_module_path
+
+_logger = logging.getLogger(__name__)
+
+STANDARD_MODULES = ['web', 'web_enterprise', 'theme_common', 'base']
+
+
+class BaseModuleUpdate(models.TransientModel):
+ _inherit = "base.module.update"
+
+ def update_addons_paths(self):
+ addons_path_obj = self.env['ir.module.addons.path']
+ ad_paths = addons.__path__
+ path_sep = os.path.sep
+ for path in ad_paths:
+ if not addons_path_obj.search([('path', '=', path)]):
+ path_temp = path
+
+ if len(path_temp) > 42:
+ path_temp = '%s......%s' % (path[:12], path[-19:])
+
+ addons_path_obj.sudo().create({
+ 'name': path.split(path_sep)[-1],
+ 'path': path,
+ 'path_temp': path_temp,
+ })
+
+ for addons_path_id in addons_path_obj.search([]):
+ if addons_path_id.path not in ad_paths:
+ addons_path_id.unlink()
+
+ def update_module_addons_paths(self):
+ addons_path_obj = self.env['ir.module.addons.path']
+ path_sep = os.path.sep
+ for module_id in self.env['ir.module.module'].search([]):
+ module_path = get_module_path(module_id.name)
+ if not module_path:
+ continue
+ addons_path = module_path.rstrip(module_id.name).rstrip(path_sep)
+ addons_path_id = addons_path_obj.search([('path', '=', addons_path)])
+
+ if addons_path_id:
+ module_id.addons_path_id = addons_path_id.id
+
+ def update_module(self):
+ res = super(BaseModuleUpdate, self).update_module()
+ self.update_addons_paths()
+ self.update_module_addons_paths()
+ return res