diff --git a/docsource/modules150-160.rst b/docsource/modules150-160.rst index cec5b51e4c57..c603f23d2803 100644 --- a/docsource/modules150-160.rst +++ b/docsource/modules150-160.rst @@ -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. | +-------------------------------------------------+----------------------+-------------------------------------------------+ diff --git a/openupgrade_scripts/scripts/payment_stripe/16.0.2.0/noupdate_changes.xml b/openupgrade_scripts/scripts/payment_stripe/16.0.2.0/noupdate_changes.xml index cfaa36bc232e..d6093b86fa26 100644 --- a/openupgrade_scripts/scripts/payment_stripe/16.0.2.0/noupdate_changes.xml +++ b/openupgrade_scripts/scripts/payment_stripe/16.0.2.0/noupdate_changes.xml @@ -2,7 +2,7 @@ True - True + stripe diff --git a/openupgrade_scripts/scripts/payment_stripe/16.0.2.0/post-migration.py b/openupgrade_scripts/scripts/payment_stripe/16.0.2.0/post-migration.py new file mode 100644 index 000000000000..b10b081ea4c1 --- /dev/null +++ b/openupgrade_scripts/scripts/payment_stripe/16.0.2.0/post-migration.py @@ -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") diff --git a/openupgrade_scripts/scripts/payment_stripe/16.0.2.0/pre-migration.py b/openupgrade_scripts/scripts/payment_stripe/16.0.2.0/pre-migration.py new file mode 100644 index 000000000000..ffd613c7b1a5 --- /dev/null +++ b/openupgrade_scripts/scripts/payment_stripe/16.0.2.0/pre-migration.py @@ -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) diff --git a/openupgrade_scripts/scripts/payment_stripe/16.0.2.0/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/payment_stripe/16.0.2.0/upgrade_analysis_work.txt new file mode 100644 index 000000000000..900c23ab37b1 --- /dev/null +++ b/openupgrade_scripts/scripts/payment_stripe/16.0.2.0/upgrade_analysis_work.txt @@ -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)