Skip to content

Commit

Permalink
Merge PR #3965 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Oct 30, 2023
2 parents fdb3972 + 9cbdbef commit 3116d5d
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docsource/modules150-160.rst
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ Module coverage 15.0 -> 16.0
+-------------------------------------------------+----------------------+-------------------------------------------------+
| payment_buckaroo | | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
| |new| payment_custom | | |
| |new| payment_custom |Done |Renamed from payment_transfer. |
+-------------------------------------------------+----------------------+-------------------------------------------------+
| |new| payment_demo | | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
Expand All @@ -576,7 +576,7 @@ Module coverage 15.0 -> 16.0
+-------------------------------------------------+----------------------+-------------------------------------------------+
| payment_stripe | | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
| |del| payment_transfer | | |
| |del| payment_transfer |Done |Renamed to payment_custom. |
+-------------------------------------------------+----------------------+-------------------------------------------------+
| phone_validation | Nothing to do |No DB layout changes. |
+-------------------------------------------------+----------------------+-------------------------------------------------+
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# SPDX-FileCopyrightText: 2023 Coop IT Easy SC
#
# SPDX-License-Identifier: AGPL-3.0-or-later

from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(env, version):
# The payment migration script renames provider.acquirer to
# payment.provider. Assume that that script has already been run.

# The provider (Selection) field no longer exists. The same information is
# now in custom_mode.
openupgrade.logged_query(
env.cr,
"""
UPDATE payment_provider
SET code = 'custom', custom_mode = 'wire_transfer'
WHERE provider = 'transfer'
""",
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# A global note: This module was renamed from payment_transfer.

---Models in module 'payment_custom'---
---Fields in module 'payment_custom'---
payment_custom / payment.provider / code (False) : NEW selection_keys: ['adyen', 'alipay', 'aps', 'asiapay', 'authorize', 'buckaroo', 'custom', 'none'], mode: modify
# DONE: post-migration: moved from payment.acquirer 'provider' field.

payment_custom / payment.provider / custom_mode (selection) : NEW selection_keys: ['wire_transfer']
# DONE: post-migration: moved from payment.acquirer 'provider' field.

payment_custom / payment.provider / qr_code (boolean) : NEW
# NOTHING TO DO: Model is renamed in payment migration. Field name is identical.

---XML records in module 'payment_custom'---
NEW ir.model.constraint: payment_custom.constraint_payment_provider_custom_providers_setup
# NOTHING TO DO: New.

NEW ir.ui.view: payment_custom.custom_transaction_status
# NOTHING TO DO: Renamed from payment_transfer.transfer_transaction_status
# with minimal changes.

NEW ir.ui.view: payment_custom.payment_provider_form
# NOTHING TO DO: Renamed from payment_transfer.payment_acquirer_form with
# minimal changes.

NEW ir.ui.view: payment_custom.redirect_form
# NOTHING TO DO: Renamed from payment_transfer with no changes.

0 comments on commit 3116d5d

Please sign in to comment.