-
-
Notifications
You must be signed in to change notification settings - Fork 695
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OU-ADD] payment_stripe: Migration to 16.0
TT45236
- Loading branch information
1 parent
fa97688
commit b109c13
Showing
5 changed files
with
61 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
openupgrade_scripts/scripts/payment_stripe/16.0.2.0/post-migration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |
19 changes: 19 additions & 0 deletions
19
openupgrade_scripts/scripts/payment_stripe/16.0.2.0/pre-migration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | ||
"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) |
26 changes: 26 additions & 0 deletions
26
openupgrade_scripts/scripts/payment_stripe/16.0.2.0/upgrade_analysis_work.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |