From 94ad84fe49b695bbb1380aca175c70c6a49abf25 Mon Sep 17 00:00:00 2001 From: Pilar Vargas Date: Wed, 10 Jun 2026 13:07:56 +0200 Subject: [PATCH] [OU-ADD] gamification: Migration scripts TT58621 --- docsource/modules180-190.rst | 2 +- .../gamification/19.0.1.0/post-migration.py | 15 +++++++++++++++ .../19.0.1.0/upgrade_analysis_work.txt | 6 ++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 openupgrade_scripts/scripts/gamification/19.0.1.0/post-migration.py create mode 100644 openupgrade_scripts/scripts/gamification/19.0.1.0/upgrade_analysis_work.txt diff --git a/docsource/modules180-190.rst b/docsource/modules180-190.rst index f67088d94e0c..f9d8cc32bc21 100644 --- a/docsource/modules180-190.rst +++ b/docsource/modules180-190.rst @@ -152,7 +152,7 @@ Module coverage 18.0 -> 19.0 +---------------------------------------------------+----------------------+-------------------------------------------------+ | fleet | | | +---------------------------------------------------+----------------------+-------------------------------------------------+ -| gamification | | | +| gamification |Done | | +---------------------------------------------------+----------------------+-------------------------------------------------+ | gamification_sale_crm | | | +---------------------------------------------------+----------------------+-------------------------------------------------+ diff --git a/openupgrade_scripts/scripts/gamification/19.0.1.0/post-migration.py b/openupgrade_scripts/scripts/gamification/19.0.1.0/post-migration.py new file mode 100644 index 000000000000..7beb15399e7e --- /dev/null +++ b/openupgrade_scripts/scripts/gamification/19.0.1.0/post-migration.py @@ -0,0 +1,15 @@ +# Copyright 2026 Tecnativa - Pilar Vargas +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.load_data(env, "gamification", "19.0.1.0/noupdate_changes.xml") + openupgrade.delete_record_translations( + env.cr, + "gamification", + ["email_template_badge_received", "mail_template_data_new_rank_reached"], + ["body_html"], + ) diff --git a/openupgrade_scripts/scripts/gamification/19.0.1.0/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/gamification/19.0.1.0/upgrade_analysis_work.txt new file mode 100644 index 000000000000..6273a64795df --- /dev/null +++ b/openupgrade_scripts/scripts/gamification/19.0.1.0/upgrade_analysis_work.txt @@ -0,0 +1,6 @@ +---Models in module 'gamification'--- +---Fields in module 'gamification'--- +gamification / gamification.badge.user / message_follower_ids (one2many): NEW relation: mail.followers +gamification / gamification.badge.user / message_ids (one2many) : NEW relation: mail.message +# NOTHING TO DO: only new mail/chatter fields were added. +---XML records in module 'gamification'---