Skip to content

Commit

Permalink
[IMP] payment: Copy the column provider to code from payment.provider
Browse files Browse the repository at this point in the history
  • Loading branch information
victoralmau committed Nov 29, 2023
1 parent fa97688 commit 2d0e117
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions openupgrade_scripts/scripts/payment/16.0.2.0/pre-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
),
]

_columns_copies = {
"payment_provider": [("provider", "code", "varchar")],
}

_xmlid_renames = [
(
"payment.action_invoice_order_generate_link",
Expand Down Expand Up @@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ payment / payment.icon / provider_ids (many2many) : NEW re
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
# DONE: pre-migration: copy the column provider to code

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
Expand Down

0 comments on commit 2d0e117

Please sign in to comment.