From def20ec52b333304905f39805c7044894c9a6fc0 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Sun, 31 Mar 2024 16:30:06 +0200 Subject: [PATCH] [OU-ADD] auth_totp_mail: Migration scripts TT42388 --- docsource/modules150-160.rst | 2 +- .../scripts/auth_totp_mail/16.0.1.0/post-migration.py | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 openupgrade_scripts/scripts/auth_totp_mail/16.0.1.0/post-migration.py diff --git a/docsource/modules150-160.rst b/docsource/modules150-160.rst index e7111680041c..69267cb7b5b4 100644 --- a/docsource/modules150-160.rst +++ b/docsource/modules150-160.rst @@ -56,7 +56,7 @@ Module coverage 15.0 -> 16.0 +-------------------------------------------------+----------------------+-------------------------------------------------+ | auth_totp | Nothing to do |No DB layout changes. | +-------------------------------------------------+----------------------+-------------------------------------------------+ -| auth_totp_mail | | | +| auth_totp_mail | Done | | +-------------------------------------------------+----------------------+-------------------------------------------------+ | auth_totp_mail_enforce | |No DB layout changes. | +-------------------------------------------------+----------------------+-------------------------------------------------+ diff --git a/openupgrade_scripts/scripts/auth_totp_mail/16.0.1.0/post-migration.py b/openupgrade_scripts/scripts/auth_totp_mail/16.0.1.0/post-migration.py new file mode 100644 index 000000000000..09ad03a183d4 --- /dev/null +++ b/openupgrade_scripts/scripts/auth_totp_mail/16.0.1.0/post-migration.py @@ -0,0 +1,11 @@ +# Copyright 2024 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.load_data(env.cr, "auth_totp_mail", "16.0.1.0/noupdate_changes.xml") + openupgrade.delete_record_translations( + env.cr, "auth_totp_mail", ["mail_template_totp_invite"], ["name", "email_from"] + )