diff --git a/openupgrade_scripts/scripts/payment/16.0.2.0/pre-migration.py b/openupgrade_scripts/scripts/payment/16.0.2.0/pre-migration.py index 72812edf3d16..21457b48dd83 100644 --- a/openupgrade_scripts/scripts/payment/16.0.2.0/pre-migration.py +++ b/openupgrade_scripts/scripts/payment/16.0.2.0/pre-migration.py @@ -69,6 +69,10 @@ ), ] +_columns_copies = { + "payment_provider": [("provider", "code", "varchar")], +} + _xmlid_renames = [ ( "payment.action_invoice_order_generate_link", @@ -210,4 +214,5 @@ def migrate(env, version): openupgrade.rename_models(env.cr, _model_renames) openupgrade.rename_tables(env.cr, _table_renames) openupgrade.rename_fields(env, _field_renames) + openupgrade.copy_columns(env.cr, _columns_copies) openupgrade.rename_xmlids(env.cr, _xmlid_renames) diff --git a/openupgrade_scripts/scripts/payment/16.0.2.0/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/payment/16.0.2.0/upgrade_analysis_work.txt index 9e72d4e78598..60bc39dd10e3 100644 --- a/openupgrade_scripts/scripts/payment/16.0.2.0/upgrade_analysis_work.txt +++ b/openupgrade_scripts/scripts/payment/16.0.2.0/upgrade_analysis_work.txt @@ -59,9 +59,11 @@ payment / payment.icon / acquirer_ids (many2many) : DEL re payment / payment.icon / provider_ids (many2many) : NEW relation: payment.provider # DONE: pre-migration: Renamed from acquirer_ids to provider_ids. Renamed relation table payment_acquirer_payment_icon_rel -> payment_provider_payment_icon_rel +payment / payment.provider / code (selection) : NEW required, selection_keys: ['none'], hasdefault: default +# DONE: pre-migration: copy the column provider to code + payment / payment.provider / allow_express_checkout (boolean): NEW payment / payment.provider / available_country_ids (many2many): NEW relation: res.country -payment / payment.provider / code (selection) : NEW required, selection_keys: ['none'], hasdefault: default payment / payment.provider / express_checkout_form_view_id (many2one): NEW relation: ir.ui.view payment / payment.provider / is_published (boolean) : NEW payment / payment.provider / maximum_amount (float) : NEW