mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
fix checkmodule
This commit is contained in:
@@ -17,12 +17,14 @@
|
||||
|
||||
from odoo import api, SUPERUSER_ID, _
|
||||
|
||||
|
||||
def pre_init_hook(cr):
|
||||
"""
|
||||
数据初始化,只在安装时执行,更新时不执行
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
def post_init_hook(cr, registry):
|
||||
"""
|
||||
数据初始化,只在安装后执行,更新时不执行
|
||||
@@ -37,5 +39,10 @@ def post_init_hook(cr, registry):
|
||||
('location_id', '=', False)
|
||||
])
|
||||
ids._compute_complete_name()
|
||||
# 超级用户改时区为中国
|
||||
ids = env['res.users'].sudo().with_context(lang='zh_CN').search([
|
||||
('id', '=', 2)
|
||||
])
|
||||
ids.write({'tz': "Asia/Shanghai"})
|
||||
except Exception as e:
|
||||
raise Warning(e)
|
||||
|
||||
Reference in New Issue
Block a user