Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][OU-ADD] payment_paypal: Migration to 16.0 #4179

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docsource/modules150-160.rst
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ Module coverage 15.0 -> 16.0
+-------------------------------------------------+----------------------+-------------------------------------------------+
| payment_ogone | | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
| payment_paypal | | |
| payment_paypal | Done | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
| payment_payulatam | | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<odoo>
<record id="payment.payment_provider_paypal" model="payment.provider">
<field name="code">paypal</field>
victoralmau marked this conversation as resolved.
Show resolved Hide resolved
<field name="redirect_form_view_id" ref="redirect_form"/>
<!-- <field name="redirect_form_view_id" ref="redirect_form"/> -->
</record>
</odoo>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2023 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(env, version):
openupgrade.delete_records_safely_by_xml_id(
env,
[
"payment_paypal.payment_method_paypal",
],
)
openupgrade.load_data(env.cr, "payment_paypal", "16.0.2.0/noupdate_changes.xml")
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2023 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade

_xmlids_renames = [
(
"payment_paypal.payment_acquirer_form",
"payment_paypal.payment_provider_form",
),
]


@openupgrade.migrate()
def migrate(env, version):
openupgrade.rename_xmlids(env.cr, _xmlids_renames)
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---Models in module 'payment_paypal'---
---Fields in module 'payment_paypal'---
payment_paypal / payment.acquirer / paypal_email_account (char) : DEL
payment_paypal / payment.acquirer / paypal_pdt_token (char) : DEL
payment_paypal / payment.acquirer / paypal_seller_account (char) : DEL
payment_paypal / payment.acquirer / paypal_use_ipn (boolean) : DEL
payment_paypal / payment.acquirer / provider (False) : DEL selection_keys: ['adyen', 'alipay', 'authorize', 'buckaroo', 'mollie', 'none', 'ogone', 'paypal'], mode: modify
payment_paypal / payment.provider / code (False) : NEW selection_keys: ['adyen', 'alipay', 'aps', 'asiapay', 'authorize', 'buckaroo', 'custom', 'demo', 'flutterwave', 'mercado_pago', 'mollie', 'none', 'ogone', 'paypal'], mode: modify
payment_paypal / payment.provider / paypal_email_account (char) : NEW
payment_paypal / payment.provider / paypal_pdt_token (char) : NEW
payment_paypal / payment.provider / paypal_seller_account (char) : NEW
payment_paypal / payment.provider / paypal_use_ipn (boolean) : NEW hasdefault: default
victoralmau marked this conversation as resolved.
Show resolved Hide resolved
# NOTHING TO DO: `payment.acquirer` renamed to `payment.provider` in payment module
victoralmau marked this conversation as resolved.
Show resolved Hide resolved

---XML records in module 'payment_paypal'---
DEL account.payment.method: payment_paypal.payment_method_paypal (noupdate)
# DONE: post-migration (delete record)
victoralmau marked this conversation as resolved.
Show resolved Hide resolved

NEW ir.ui.view: payment_paypal.payment_provider_form
DEL ir.ui.view: payment_paypal.payment_acquirer_form
victoralmau marked this conversation as resolved.
Show resolved Hide resolved
# DONE: pre-migration (renamed)
Loading