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_stripe: Migration to 16.0 #4178

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 @@ -574,7 +574,7 @@ Module coverage 15.0 -> 16.0
+-------------------------------------------------+----------------------+-------------------------------------------------+
| payment_sips | | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
| payment_stripe | | |
| payment_stripe | Done | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
| |del| payment_transfer |Done |Renamed to payment_custom. |
+-------------------------------------------------+----------------------+-------------------------------------------------+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<odoo>
<record id="payment.payment_provider_stripe" model="payment.provider">
<field name="allow_express_checkout">True</field>
<field name="allow_tokenization">True</field>
<!-- <field name="allow_tokenization">True</field> -->
<field name="code">stripe</field>
<field name="express_checkout_form_view_id" ref="express_checkout_form"/>
</record>
Expand Down
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_stripe.payment_method_stripe",
],
)
openupgrade.load_data(env.cr, "payment_stripe", "16.0.2.0/noupdate_changes.xml")
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 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_stripe.action_payment_acquirer_onboarding",
victoralmau marked this conversation as resolved.
Show resolved Hide resolved
"payment_stripe.action_payment_provider_onboarding",
),
(
"payment_stripe.payment_acquirer_form",
"payment_stripe.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,26 @@
---Models in module 'payment_stripe'---
---Fields in module 'payment_stripe'---
payment_stripe / payment.acquirer / provider (False) : DEL selection_keys: ['adyen', 'alipay', 'authorize', 'buckaroo', 'mollie', 'none', 'ogone', 'paypal', 'payulatam', 'payumoney', 'sips', 'stripe'], mode: modify
payment_stripe / payment.acquirer / stripe_publishable_key (char) : DEL
payment_stripe / payment.acquirer / stripe_secret_key (char) : DEL
payment_stripe / payment.acquirer / stripe_webhook_secret (char) : DEL
payment_stripe / payment.provider / code (False) : NEW selection_keys: ['adyen', 'alipay', 'aps', 'asiapay', 'authorize', 'buckaroo', 'custom', 'demo', 'flutterwave', 'mercado_pago', 'mollie', 'none', 'ogone', 'paypal', 'payulatam', 'payumoney', 'razorpay', 'sips', 'stripe'], mode: modify
payment_stripe / payment.provider / stripe_publishable_key (char) : NEW
payment_stripe / payment.provider / stripe_secret_key (char) : NEW
payment_stripe / payment.provider / stripe_webhook_secret (char) : NEW
# NOTHING TO DO: `payment.acquirer` renamed to `payment.provider` in payment module

---XML records in module 'payment_stripe'---
DEL account.payment.method: payment_stripe.payment_method_stripe (noupdate)
# DONE: post-migration (delete record)

NEW ir.actions.act_window: payment_stripe.action_payment_provider_onboarding
DEL ir.actions.act_window: payment_stripe.action_payment_acquirer_onboarding
# DONE: pre-migration (renamed)

NEW ir.ui.view: payment_stripe.express_checkout
NEW ir.ui.view: payment_stripe.express_checkout_form
NEW ir.ui.view: payment_stripe.payment_provider_form
NEW ir.ui.view: payment_stripe.sdk_assets
DEL ir.ui.view: payment_stripe.payment_acquirer_form
# DONE: pre-migration (renamed)
Loading