Skip to content

Commit

Permalink
Merge pull request #4241 from Tecnativa/16.0-imp-payment-provider_column
Browse files Browse the repository at this point in the history
[16.0][OU-IMP] payment: Copy the column provider to code from payment.provider
  • Loading branch information
pedrobaeza authored Nov 29, 2023
2 parents 9689147 + 9ecbb43 commit 93ed517
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
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 @@ -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
Expand Down

0 comments on commit 93ed517

Please sign in to comment.