diff --git a/app_base_chinese/hooks.py b/app_base_chinese/hooks.py index 7c2bdf21..6a38a7e7 100644 --- a/app_base_chinese/hooks.py +++ b/app_base_chinese/hooks.py @@ -18,7 +18,7 @@ from odoo import api, SUPERUSER_ID, _ -def pre_init_hook(cr): +def pre_init_hook(env): """ 数据初始化,只在安装时执行,更新时不执行 """ @@ -26,25 +26,24 @@ def pre_init_hook(cr): pass -def post_init_hook(cr, registry): +def post_init_hook(env): """ 数据初始化,只在安装后执行,更新时不执行 """ try: - env = api.Environment(cr, SUPERUSER_ID, {'active_test': False}) - ids = env['product.category'].sudo().with_context(lang='zh_CN').search([ + ids = env['product.category'].sudo().with_context(lang='zh_CN', active_test=False).search([ ('parent_id', '!=', False) ], order='parent_path') for rec in ids: rec._compute_complete_name() - ids = env['stock.location'].sudo().with_context(lang='zh_CN').search([ + ids = env['stock.location'].sudo().with_context(lang='zh_CN', active_test=False).search([ ('location_id', '!=', False), ('usage', '!=', 'views'), ], order='parent_path') for rec in ids: rec._compute_complete_name() # 超级用户改时区为中国 - ids = env['res.users'].sudo().with_context(lang='zh_CN').browse([1, 2]) + ids = env['res.users'].sudo().with_context(lang='zh_CN', active_test=False).browse([1, 2]) ids.write({'tz': "Etc/GMT-8"}) # 公司价格改人民币 ids = env['res.company'].sudo().search([], limit=1) @@ -57,7 +56,7 @@ def post_init_hook(cr, registry): except Exception as e: raise Warning(e) -def uninstall_hook(cr, registry): +def uninstall_hook(env): """ 数据初始化,卸载时执行 """ diff --git a/app_common/hooks.py b/app_common/hooks.py index 40a5ccf5..bd41b59e 100644 --- a/app_common/hooks.py +++ b/app_common/hooks.py @@ -18,15 +18,15 @@ from odoo import api, SUPERUSER_ID, _ -def pre_init_hook(cr): +def pre_init_hook(env): pass # cr.execute("") -def post_init_hook(cr, registry): +def post_init_hook(env): pass # cr.execute("") -def uninstall_hook(cr, registry): +def uninstall_hook(env): pass # cr.execute("") diff --git a/app_odoo_customize/hooks.py b/app_odoo_customize/hooks.py index ed8accda..ed66bfc5 100644 --- a/app_odoo_customize/hooks.py +++ b/app_odoo_customize/hooks.py @@ -18,32 +18,31 @@ from odoo import api, SUPERUSER_ID, _ -def pre_init_hook(cr): +def pre_init_hook(env): try: # 更新企业版指向 sql = "UPDATE ir_module_module SET website = '%s' WHERE license like '%s' and website <> ''" % ('https://www.odooai.cn', 'OEEL%') - cr.execute(sql) - cr.commit() + env.cr.execute(sql) + env.cr.commit() except Exception as e: pass -def post_init_hook(cr): +def post_init_hook(env): # a = check_module_installed(cr, ['app_web_superbar','aaaaa']) pass # cr.execute("") -def uninstall_hook(cr, registry): +def uninstall_hook(env): """ 数据初始化,卸载时执行 """ pass -def check_module_installed(cr, modules): +def check_module_installed(env, 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) + return installed diff --git a/app_odoo_customize/static/description/banner.gif b/app_odoo_customize/static/description/banner.gif index fa09adee..3cd4d9e1 100644 Binary files a/app_odoo_customize/static/description/banner.gif and b/app_odoo_customize/static/description/banner.gif differ diff --git a/app_odoo_customize/static/description/banner.png b/app_odoo_customize/static/description/banner.png index 6bff8fd9..628d2ff2 100644 Binary files a/app_odoo_customize/static/description/banner.png and b/app_odoo_customize/static/description/banner.png differ diff --git a/app_odoo_customize/static/description/index.html b/app_odoo_customize/static/description/index.html index 78a1d44a..0fab14cc 100644 --- a/app_odoo_customize/static/description/index.html +++ b/app_odoo_customize/static/description/index.html @@ -20,7 +20,7 @@
-

This is a Long Term Support Apps.Update: v17.24.02.27

+

This is a Long Term Support Apps.Update: v17.24.03.01

  • 1. Deletes Odoo label in footer
  • @@ -299,6 +299,10 @@

    This is a Long Term Support Apps.

    +

    Update: v17.24.03.01

    +

    Add more function for odoo 17.Dialog, language switcher.

    +

    Update: v17.24.02.26

    +

    Fix bug for odoo 17 origin update.

    Update: v16.23.09.13

    UI enhance. follow odoo16 setup UI.

    46. Add Help documentation anywhere. easy get help for any odoo operation or action.

    diff --git a/app_odoo_customize/views/app_odoo_customize_views.xml b/app_odoo_customize/views/app_odoo_customize_views.xml index d574c280..55199d2c 100644 --- a/app_odoo_customize/views/app_odoo_customize_views.xml +++ b/app_odoo_customize/views/app_odoo_customize_views.xml @@ -17,7 +17,7 @@