Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docsource/modules180-190.rst
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ Module coverage 18.0 -> 19.0
+---------------------------------------------------+----------------------+-------------------------------------------------+
| l10n_uk | | |
+---------------------------------------------------+----------------------+-------------------------------------------------+
| l10n_us | | |
| l10n_us |Done | |
+---------------------------------------------------+----------------------+-------------------------------------------------+
| l10n_us_account | | |
+---------------------------------------------------+----------------------+-------------------------------------------------+
Expand Down
17 changes: 17 additions & 0 deletions openupgrade_scripts/scripts/l10n_us/19.0.1.1/pre-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from openupgradelib import openupgrade

# Preserve the 18.0 res.partner.bank.aba_routing value before Odoo's
# update_db drops the column. The standard OpenUpgrade pattern renames it
# to openupgrade_legacy_19_0_aba_routing so the data survives the upgrade
# and database_cleanup can prompt the operator later. Source:
# upgrade_analysis.txt — "aba_routing (char) : DEL".
_renamed_columns = {
"res_partner_bank": [
("aba_routing", None),
],
}


@openupgrade.migrate()
def migrate(env, version):
openupgrade.rename_columns(env.cr, _renamed_columns)
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---Models in module 'l10n_us'---
---Fields in module 'l10n_us'---
l10n_us / res.partner.bank / aba_routing (char) : DEL

# DONE: preserved in pre-migration as openupgrade_legacy_19_0_aba_routing for database_cleanup.

l10n_us / res.partner.bank / l10n_us_bank_account_type (selection): NEW required, selection_keys: ['checking', 'savings'], hasdefault: default

# NOTHING TO DO: Odoo's update_db creates the column and applies the default ('checking') to existing rows.

---XML records in module 'l10n_us'---
Loading