mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
add super m2o, o2m
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user