From 6e3879f05c6666ddd2c5c92bc535b6b7d9c5323c Mon Sep 17 00:00:00 2001 From: mle Date: Thu, 15 Jun 2023 09:12:20 +0200 Subject: [PATCH] [OU-FIX] auth_signup: load noupdate_changes --- docsource/modules150-160.rst | 2 +- .../auth_signup/16.0.1.0/post-migration.py | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 openupgrade_scripts/scripts/auth_signup/16.0.1.0/post-migration.py diff --git a/docsource/modules150-160.rst b/docsource/modules150-160.rst index fb8ffab32c94..8f7fadde4eed 100644 --- a/docsource/modules150-160.rst +++ b/docsource/modules150-160.rst @@ -52,7 +52,7 @@ Module coverage 15.0 -> 16.0 +-------------------------------------------------+----------------------+-------------------------------------------------+ | auth_password_policy_signup | | | +-------------------------------------------------+----------------------+-------------------------------------------------+ -| auth_signup | Nothing to do | | +| auth_signup | Done | | +-------------------------------------------------+----------------------+-------------------------------------------------+ | auth_totp | |No DB layout changes. | +-------------------------------------------------+----------------------+-------------------------------------------------+ diff --git a/openupgrade_scripts/scripts/auth_signup/16.0.1.0/post-migration.py b/openupgrade_scripts/scripts/auth_signup/16.0.1.0/post-migration.py new file mode 100644 index 000000000000..27c1ee2f9727 --- /dev/null +++ b/openupgrade_scripts/scripts/auth_signup/16.0.1.0/post-migration.py @@ -0,0 +1,19 @@ +# Copyright 2023 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from openupgradelib import openupgrade + +_translations_to_delete = [ + "mail_template_data_unregistered_users", + "mail_template_user_signup_account_created", + "reset_password_email", + "set_password_email", +] + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.load_data(env.cr, "auth_signup", "16.0.1.0/noupdate_changes.xml") + openupgrade.delete_record_translations( + env.cr, "auth_signup", _translations_to_delete + )