fix account

This commit is contained in:
ivan deng
2020-10-30 17:47:37 +08:00
parent d70e2e6a24
commit 73ecbadb36
5 changed files with 18 additions and 108 deletions

View File

@@ -29,11 +29,11 @@ def post_init_hook(cr, registry):
数据初始化,只在安装后执行,更新时不执行
此处不执行,只是记录,该数据已处理完成
"""
cr.execute("UPDATE account_account_template set group_id = "
"(select id from account_group where account_group.code_prefix=trim(substring(account_account_template.code from 1 for 1)) limit 1);")
# cr.execute("UPDATE account_account_template set group_id = "
# "(select id from account_group where account_group.code_prefix_start=trim(substring(account_account_template.code from 1 for 1)) limit 1);")
cr.execute("UPDATE account_account set group_id = "
"(select id from account_group where account_group.code_prefix=trim(substring(account_account.code from 1 for 1)) limit 1);")
"(select id from account_group where account_group.code_prefix_start=trim(substring(account_account.code from 1 for 1)) limit 1);")
cr.commit()
pass