add super m2o, o2m

This commit is contained in:
ivan deng
2020-10-24 22:55:27 +08:00
parent 2e70ec1571
commit 3d2c6a138d
5 changed files with 55 additions and 5 deletions

View File

@@ -18,7 +18,7 @@
{
'name': "App base chinese中国化基本模块增强",
'version': '13.20.09.19',
'version': '13.20.10.19',
'author': 'Sunpop.cn',
'category': 'Base',
'website': 'https://www.sunpop.cn',

View File

@@ -33,13 +33,13 @@ def post_init_hook(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})
ids = env['product.category'].sudo().with_context(lang='zh_CN').search([
('parent_id', '!=', False)
], order='complete_name')
], order='parent_path')
for rec in ids:
rec._compute_complete_name()
ids = env['stock.location'].sudo().with_context(lang='zh_CN').search([
('location_id', '!=', False),
('usage', '!=', 'views'),
], order='complete_name')
], order='parent_path')
for rec in ids:
rec._compute_complete_name()
# 超级用户改时区为中国
@@ -52,4 +52,4 @@ def uninstall_hook(cr, registry):
"""
数据初始化,卸载时执行
"""
pass
pass