From 9b7bab47b58ca724c38c7eba2d4e4e2b835df34e Mon Sep 17 00:00:00 2001 From: Huy Lee <66666640+ngochuy97hp@users.noreply.github.com> Date: Wed, 19 Jul 2023 18:03:39 +0700 Subject: [PATCH] [OU-ADD] payment_paypal: mig to 16.0 (#478) * [OU-ADD] payment_paypal: mig to 16.0 * Update openupgrade_scripts/scripts/payment_paypal/16.0.2.0/post-migration.py --------- Co-authored-by: Roy Le <43790414+royleviindoo@users.noreply.github.com> --- docsource/modules150-160.rst | 2 +- .../payment_paypal/16.0.2.0/post-migration.py | 12 ++++++++++++ .../16.0.2.0/upgrade_analysis_work.txt | 16 ++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 openupgrade_scripts/scripts/payment_paypal/16.0.2.0/post-migration.py create mode 100644 openupgrade_scripts/scripts/payment_paypal/16.0.2.0/upgrade_analysis_work.txt diff --git a/docsource/modules150-160.rst b/docsource/modules150-160.rst index f85a94274763..0ae83651db1f 100644 --- a/docsource/modules150-160.rst +++ b/docsource/modules150-160.rst @@ -564,7 +564,7 @@ Module coverage 15.0 -> 16.0 +-------------------------------------------------+----------------------+-------------------------------------------------+ | payment_ogone | | | +-------------------------------------------------+----------------------+-------------------------------------------------+ -| payment_paypal | | | +| payment_paypal |Done | | +-------------------------------------------------+----------------------+-------------------------------------------------+ | payment_payulatam | | | +-------------------------------------------------+----------------------+-------------------------------------------------+ diff --git a/openupgrade_scripts/scripts/payment_paypal/16.0.2.0/post-migration.py b/openupgrade_scripts/scripts/payment_paypal/16.0.2.0/post-migration.py new file mode 100644 index 000000000000..ca88990dd5f0 --- /dev/null +++ b/openupgrade_scripts/scripts/payment_paypal/16.0.2.0/post-migration.py @@ -0,0 +1,12 @@ +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.load_data(env.cr, "payment_paypal", "16.0.2.0/noupdate_changes.xml") + openupgrade.delete_records_safely_by_xml_id( + env, + [ + "payment_paypal.payment_method_paypal", + ], + ) diff --git a/openupgrade_scripts/scripts/payment_paypal/16.0.2.0/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/payment_paypal/16.0.2.0/upgrade_analysis_work.txt new file mode 100644 index 000000000000..081af91abc9f --- /dev/null +++ b/openupgrade_scripts/scripts/payment_paypal/16.0.2.0/upgrade_analysis_work.txt @@ -0,0 +1,16 @@ +---Models in module 'payment_paypal'--- +---Fields in module 'payment_paypal'--- +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', 'aps', 'asiapay', 'authorize', 'buckaroo', 'custom', 'demo', 'flutterwave', 'mercado_pago', 'mollie', 'none', 'paypal'], mode: modify +# NOTHING TO DO: field renaming is done at module payment + +---XML records in module 'payment_paypal'--- +DEL account.payment.method: payment_paypal.payment_method_paypal (noupdate) +# DONE: post-migration: safely remove + +NEW ir.ui.view: payment_paypal.payment_provider_form +DEL ir.ui.view: payment_paypal.payment_acquirer_form +# NOTHING TO DO + +DEL payment.acquirer: payment.payment_acquirer_paypal (noupdate) +# NOTHING TO DO: handled at module payment