Skip to content

Commit 9689147

Browse files
authored
Merge pull request #4178 from Tecnativa/16.0-mig-payment_stripe
[16.0][OU-ADD] payment_stripe: Migration to 16.0
2 parents 1c056b1 + b109c13 commit 9689147

File tree

5 files changed

+61
-2
lines changed

5 files changed

+61
-2
lines changed

docsource/modules150-160.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ Module coverage 15.0 -> 16.0
574574
+-------------------------------------------------+----------------------+-------------------------------------------------+
575575
| payment_sips | | |
576576
+-------------------------------------------------+----------------------+-------------------------------------------------+
577-
| payment_stripe | | |
577+
| payment_stripe | Done | |
578578
+-------------------------------------------------+----------------------+-------------------------------------------------+
579579
| |del| payment_transfer |Done |Renamed to payment_custom. |
580580
+-------------------------------------------------+----------------------+-------------------------------------------------+

openupgrade_scripts/scripts/payment_stripe/16.0.2.0/noupdate_changes.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<odoo>
33
<record id="payment.payment_provider_stripe" model="payment.provider">
44
<field name="allow_express_checkout">True</field>
5-
<field name="allow_tokenization">True</field>
5+
<!-- <field name="allow_tokenization">True</field> -->
66
<field name="code">stripe</field>
77
<field name="express_checkout_form_view_id" ref="express_checkout_form"/>
88
</record>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright 2023 Tecnativa - Víctor Martínez
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3+
from openupgradelib import openupgrade
4+
5+
6+
@openupgrade.migrate()
7+
def migrate(env, version):
8+
openupgrade.delete_records_safely_by_xml_id(
9+
env,
10+
[
11+
"payment_stripe.payment_method_stripe",
12+
],
13+
)
14+
openupgrade.load_data(env.cr, "payment_stripe", "16.0.2.0/noupdate_changes.xml")
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2023 Tecnativa - Víctor Martínez
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3+
from openupgradelib import openupgrade
4+
5+
_xmlids_renames = [
6+
(
7+
"payment_stripe.action_payment_acquirer_onboarding",
8+
"payment_stripe.action_payment_provider_onboarding",
9+
),
10+
(
11+
"payment_stripe.payment_acquirer_form",
12+
"payment_stripe.payment_provider_form",
13+
),
14+
]
15+
16+
17+
@openupgrade.migrate()
18+
def migrate(env, version):
19+
openupgrade.rename_xmlids(env.cr, _xmlids_renames)
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---Models in module 'payment_stripe'---
2+
---Fields in module 'payment_stripe'---
3+
payment_stripe / payment.acquirer / provider (False) : DEL selection_keys: ['adyen', 'alipay', 'authorize', 'buckaroo', 'mollie', 'none', 'ogone', 'paypal', 'payulatam', 'payumoney', 'sips', 'stripe'], mode: modify
4+
payment_stripe / payment.acquirer / stripe_publishable_key (char) : DEL
5+
payment_stripe / payment.acquirer / stripe_secret_key (char) : DEL
6+
payment_stripe / payment.acquirer / stripe_webhook_secret (char) : DEL
7+
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
8+
payment_stripe / payment.provider / stripe_publishable_key (char) : NEW
9+
payment_stripe / payment.provider / stripe_secret_key (char) : NEW
10+
payment_stripe / payment.provider / stripe_webhook_secret (char) : NEW
11+
# NOTHING TO DO: `payment.acquirer` renamed to `payment.provider` in payment module
12+
13+
---XML records in module 'payment_stripe'---
14+
DEL account.payment.method: payment_stripe.payment_method_stripe (noupdate)
15+
# DONE: post-migration (delete record)
16+
17+
NEW ir.actions.act_window: payment_stripe.action_payment_provider_onboarding
18+
DEL ir.actions.act_window: payment_stripe.action_payment_acquirer_onboarding
19+
# DONE: pre-migration (renamed)
20+
21+
NEW ir.ui.view: payment_stripe.express_checkout
22+
NEW ir.ui.view: payment_stripe.express_checkout_form
23+
NEW ir.ui.view: payment_stripe.payment_provider_form
24+
NEW ir.ui.view: payment_stripe.sdk_assets
25+
DEL ir.ui.view: payment_stripe.payment_acquirer_form
26+
# DONE: pre-migration (renamed)

0 commit comments

Comments
 (0)