diff --git a/docsource/modules180-190.rst b/docsource/modules180-190.rst index e7f797ce0766..6d0d7312ca11 100644 --- a/docsource/modules180-190.rst +++ b/docsource/modules180-190.rst @@ -576,7 +576,7 @@ Module coverage 18.0 -> 19.0 +---------------------------------------------------+----------------------+-------------------------------------------------+ | l10n_nl | | | +---------------------------------------------------+----------------------+-------------------------------------------------+ -| l10n_no | | | +| l10n_no |Done | | +---------------------------------------------------+----------------------+-------------------------------------------------+ | l10n_nz | | | +---------------------------------------------------+----------------------+-------------------------------------------------+ diff --git a/openupgrade_scripts/scripts/l10n_no/19.0.2.1/pre-migration.py b/openupgrade_scripts/scripts/l10n_no/19.0.2.1/pre-migration.py new file mode 100644 index 000000000000..fc9b51f72b75 --- /dev/null +++ b/openupgrade_scripts/scripts/l10n_no/19.0.2.1/pre-migration.py @@ -0,0 +1,24 @@ +from openupgradelib import openupgrade + +# Without this column-add the 19.0 account chart_template loader's +# `account.tax.mapped(...)` query references account_tax.l10n_no_standard_code +# before the l10n_no install step would have created the column, crashing +# the migration with UndefinedColumn. See upgrade_analysis.txt — the field +# is NEW in 19.0 and there is no upstream pre-migration script in stock +# OpenUpgrade as of 19.0.2.1. +_added_fields = [ + ( + "l10n_no_standard_code", + "account.tax", + "account_tax", + "char", + None, + "l10n_no", + None, + ), +] + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.add_fields(env, _added_fields) diff --git a/openupgrade_scripts/scripts/l10n_no/19.0.2.1/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/l10n_no/19.0.2.1/upgrade_analysis_work.txt new file mode 100644 index 000000000000..d16e5c287d40 --- /dev/null +++ b/openupgrade_scripts/scripts/l10n_no/19.0.2.1/upgrade_analysis_work.txt @@ -0,0 +1,14 @@ +---Models in module 'l10n_no'--- +---Fields in module 'l10n_no'--- +l10n_no / account.journal / invoice_reference_model (False): selection_keys added: [number] (most likely nothing to do) + +# NOTHING TO DO: pure selection-keys widening on an existing column; Odoo's update_db handles it. + +l10n_no / account.tax / l10n_no_standard_code (char) : NEW + +# DONE: added in pre-migration as a NULL column so the 19.0 account chart_template loader (account.tax.mapped) doesn't crash with UndefinedColumn before the l10n_no install step runs. + +---XML records in module 'l10n_no'--- +NEW ir.ui.view: l10n_no.account_tax_form_inherit_l10n_no + +# NOTHING TO DO: standard view record loaded during install.