fix checkmodule

This commit is contained in:
ivan deng
2019-05-01 19:07:35 +08:00
parent 8692177b53
commit 07efe82c50
3 changed files with 12 additions and 4 deletions

View File

@@ -18,7 +18,7 @@
{ {
'name': "App base chinese中国化基本模块增强", 'name': "App base chinese中国化基本模块增强",
'version': '12.19.04.15', 'version': '12.19.05.01',
'author': 'Sunpop.cn', 'author': 'Sunpop.cn',
'category': 'Base', 'category': 'Base',
'website': 'https://www.sunpop.cn', 'website': 'https://www.sunpop.cn',
@@ -36,9 +36,10 @@
2. 客户加简称,地址显示中文化,客户编码显示优先 2. 客户加简称,地址显示中文化,客户编码显示优先
3. 客户地址显示增加手机号与电话号码 3. 客户地址显示增加手机号与电话号码
4. 货币处理,增加排序显示 4. 货币处理,增加排序显示
6. 用户名支持翻译(可能会增加复杂度,后续看) 5. 用户名支持翻译(可能会增加复杂度,后续看)
5. 修正产品类别的列表及m2o字段中不显示中文目录名的Bug 6. 修正产品类别的列表及m2o字段中不显示中文目录名的Bug
6. 修正仓库位置的列表及m2o字段中不显示中文目录名的Bug 7. 修正仓库位置的列表及m2o字段中不显示中文目录名的Bug
8. 超级用户改时区为 中国
11. todo:中文演示数据(只有demo模式才加载) 11. todo:中文演示数据(只有demo模式才加载)
""", """,

View File

@@ -17,12 +17,14 @@
from odoo import api, SUPERUSER_ID, _ from odoo import api, SUPERUSER_ID, _
def pre_init_hook(cr): def pre_init_hook(cr):
""" """
数据初始化,只在安装时执行,更新时不执行 数据初始化,只在安装时执行,更新时不执行
""" """
pass pass
def post_init_hook(cr, registry): def post_init_hook(cr, registry):
""" """
数据初始化,只在安装后执行,更新时不执行 数据初始化,只在安装后执行,更新时不执行
@@ -37,5 +39,10 @@ def post_init_hook(cr, registry):
('location_id', '=', False) ('location_id', '=', False)
]) ])
ids._compute_complete_name() 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: except Exception as e:
raise Warning(e) raise Warning(e)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 17 KiB