diff --git a/app_mrp_superbar/__manifest__.py b/app_mrp_superbar/__manifest__.py index 8a68971b..68a71ee7 100644 --- a/app_mrp_superbar/__manifest__.py +++ b/app_mrp_superbar/__manifest__.py @@ -17,16 +17,16 @@ { 'name': "App mrp Manufacturing Orders browse by state workcenter navigator", - 'version': '12.19.04.22', + 'version': '12.19.04.28', 'author': 'Sunpop.cn', 'category': 'Base', 'website': 'https://www.sunpop.cn', 'license': 'LGPL-3', 'sequence': 2, 'summary': """ - Browse mrp order, Manufacturing Orders by Materials Availability, work center. Use for parent children tree list kanban navigator. + Browse mrp order, Manufacturing Orders by Materials Availability, work center. Easy to navigator and browse any data. Support Search more list, kanban, pivot, graph view. - ztree widget.Hierarchy Tree.Parent Children relation tree.. + ztree widget.Hierarchy Tree. """, 'description': """ Superbar, zTree widget. diff --git a/app_odoo_customize/hooks.py b/app_odoo_customize/hooks.py index 2d3c7229..a48dfd25 100644 --- a/app_odoo_customize/hooks.py +++ b/app_odoo_customize/hooks.py @@ -15,6 +15,9 @@ # https://www.sunpop.cn/odoo10_developer_document_offline/ # description: +from odoo import api, SUPERUSER_ID, _ + + def pre_init_hook(cr): try: # 更新企业版指向 @@ -24,5 +27,16 @@ def pre_init_hook(cr): pass def post_init_hook(cr, registry): + # a = check_module_installed(cr, ['app_web_superbar','aaaaa']) pass # cr.execute("") + +def check_module_installed(cr, modules): + # modules 输入参数是个 list,如 ['base', 'sale'] + env = api.Environment(cr, SUPERUSER_ID, {}) + installed = False + m = env['ir.module.module'].sudo().search([('name', 'in', modules), ('state', 'in', ['installed', 'to install', 'to upgrade'])]) + if len(m) == len(modules): + installed = True + return len(m) +