forked from OCA/OpenUpgrade
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# This is a combination of 13 commits.
parent c973596 author 张飞虎 <feihu.zhang@yumtown.com.cn> 1711431231 +0000 committer 张飞虎 <feihu.zhang@yumtown.com.cn> 1717058855 +0000 # This is a combination of 2 commits. # This is the 1st commit message: parent c973596 author 张飞虎 <feihu.zhang@yumtown.com.cn> 1711431231 +0000 committer 张飞虎 <feihu.zhang@yumtown.com.cn> 1717058818 +0000 添加openupgrade_framework代码OCA#4327 增加upgrade_anaylysis_work.txt init base migration script 初步完成base模块的升级脚本 初步添加account模块升级脚本 修复文件名错误 BUG Fix 增加mail模块升级脚本 完成mail升级脚本 初步添加hr升级脚本 完成hr模块升级脚本 # This is the commit message OCA#2: 完成account模块升级脚本 # This is the commit message OCA#3: 更新模块清单 # This is the commit message OCA#4: 添加sale_management升级脚本 # This is the commit message OCA#5: 修复升级问题 # This is the commit message OCA#6: 完善project模块升级脚本 # This is the commit message OCA#7: 增加一堆模块no_update的处理 # This is the commit message OCA#8: BUG Fix # This is the commit message OCA#9: 暂时移除delivery升级脚本 # This is the commit message OCA#10: 改进项目升级脚本 # This is the commit message OCA#11: 添加针对hr_responsible_id字段的处理 # This is the commit message OCA#12: 增加auth_signup升级脚本 # This is the commit message OCA#13: 修复mail_alias上的mail_channel数据
- Loading branch information
Showing
32 changed files
with
1,988 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
openupgrade_scripts/scripts/account/17.0.1.2/post-migration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright 2023 Odoo Community Association (OCA) | ||
# Copyright 2023 Shanghai Yumtown <info@yumtown.com.cn> | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from openupgradelib import openupgrade | ||
|
||
def update_company(env): | ||
openupgrade.logged_query( | ||
env.cr, | ||
"UPDATE res_company SET invoice_is_download = invoice_is_print;" | ||
) | ||
|
||
@openupgrade.migrate() | ||
def migrate(env, version): | ||
openupgrade.load_data(env, "account", "17.0.1.2/noupdate_changes.xml") | ||
update_company(env) |
19 changes: 19 additions & 0 deletions
19
openupgrade_scripts/scripts/account/17.0.1.2/pre-migration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright 2023 Odoo Community Association (OCA) | ||
# Copyright 2023 Shanghai Yumtown <info@yumtown.com.cn> | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from openupgradelib import openupgrade | ||
|
||
def update_account_report(env): | ||
openupgrade.logged_query( | ||
env.cr, | ||
""" | ||
ALTER TABLE account_report | ||
ALTER COLUMN filter_account_type TYPE varchar | ||
USING CASE WHEN filter_account_type THEN 'both' ELSE 'disabled' END; | ||
""" | ||
) | ||
|
||
@openupgrade.migrate() | ||
def migrate(env, version): | ||
update_account_report(env) |
Oops, something went wrong.