Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by StefanRijnhart
- Loading branch information
Showing
4 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
addons/l10n_us/migrations/12.0.1.1/openupgrade_analysis_work.txt
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,6 @@ | ||
---Models in module 'l10n_us'--- | ||
---Fields in module 'l10n_us'--- | ||
l10n_us / res.partner.bank / aba_routing (integer) : type is now 'char' ('integer') | ||
# DONE: handled changed type | ||
|
||
---XML records in module 'l10n_us'--- |
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 2020 ForgeFLow <http://www.forgeflow.com> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
from openupgradelib import openupgrade | ||
|
||
|
||
def map_res_partner_bank_aba_routing(env): | ||
openupgrade.logged_query( | ||
env.cr, """ | ||
UPDATE res_partner_bank | ||
SET aba_routing = '' || %s | ||
WHERE %s IS NOT NULL | ||
""", (openupgrade.get_legacy_name('aba_routing'), | ||
openupgrade.get_legacy_name('aba_routing')) | ||
) | ||
|
||
|
||
@openupgrade.migrate() | ||
def migrate(env, version): | ||
map_res_partner_bank_aba_routing(env) |
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,14 @@ | ||
# Copyright 2020 ForgeFLow <http://www.forgeflow.com> | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
from openupgradelib import openupgrade | ||
|
||
_column_renames = { | ||
'res_partner_bank': [ | ||
('aba_routing', None), | ||
], | ||
} | ||
|
||
|
||
@openupgrade.migrate() | ||
def migrate(env, version): | ||
openupgrade.rename_columns(env.cr, _column_renames) |
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