mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
fix 17 hooks
This commit is contained in:
@@ -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):
|
||||
"""
|
||||
数据初始化,卸载时执行
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user