Skip to content

Commit

Permalink
Merge PR #2192 into 12.0
Browse files Browse the repository at this point in the history
Signed-off-by StefanRijnhart
  • Loading branch information
OCA-git-bot committed Feb 14, 2020
2 parents d0fa705 + 9af17d2 commit 12b4d7c
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 1 deletion.
@@ -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'---
19 changes: 19 additions & 0 deletions addons/l10n_us/migrations/12.0.1.1/post-migration.py
@@ -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)
14 changes: 14 additions & 0 deletions addons/l10n_us/migrations/12.0.1.1/pre-migration.py
@@ -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)
2 changes: 1 addition & 1 deletion odoo/openupgrade/doc/source/modules110-120.rst
Expand Up @@ -351,7 +351,7 @@ missing in the new release are marked with |del|.
+--------------------------------------------+-------------------------------------------------+
|l10n_uk | |
+--------------------------------------------+-------------------------------------------------+
|l10n_us | |
|l10n_us | Done |
+--------------------------------------------+-------------------------------------------------+
|l10n_uy | |
+--------------------------------------------+-------------------------------------------------+
Expand Down

0 comments on commit 12b4d7c

Please sign in to comment.