fix 17 hooks

This commit is contained in:
Ivan Office
2024-02-26 14:20:30 +08:00
parent cb216a663c
commit d4a6febabc
4 changed files with 18 additions and 19 deletions

View File

@@ -18,21 +18,21 @@
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):
"""
数据初始化,卸载时执行
"""