From ea6a7cb0a7c1544b64b171c45439bbbf813acc96 Mon Sep 17 00:00:00 2001 From: pilarvargas-tecnativa Date: Tue, 26 Nov 2024 16:46:42 +0100 Subject: [PATCH] [OU-ADD] website_event: Migration scripts TT51546 --- docsource/modules160-170.rst | 2 +- .../website_event/17.0.1.4/pre-migration.py | 30 ++++++ .../17.0.1.4/upgrade_analysis_work.txt | 102 ++++++++++++++++++ 3 files changed, 133 insertions(+), 1 deletion(-) create mode 100644 openupgrade_scripts/scripts/website_event/17.0.1.4/pre-migration.py create mode 100644 openupgrade_scripts/scripts/website_event/17.0.1.4/upgrade_analysis_work.txt diff --git a/docsource/modules160-170.rst b/docsource/modules160-170.rst index 744a69c1eaaa..79f00daab1c0 100644 --- a/docsource/modules160-170.rst +++ b/docsource/modules160-170.rst @@ -894,7 +894,7 @@ Module coverage 16.0 -> 17.0 +---------------------------------------------------+----------------------+-------------------------------------------------+ | website_customer | | | +---------------------------------------------------+----------------------+-------------------------------------------------+ -| website_event | | | +| website_event | Done | | +---------------------------------------------------+----------------------+-------------------------------------------------+ | website_event_booth | | | +---------------------------------------------------+----------------------+-------------------------------------------------+ diff --git a/openupgrade_scripts/scripts/website_event/17.0.1.4/pre-migration.py b/openupgrade_scripts/scripts/website_event/17.0.1.4/pre-migration.py new file mode 100644 index 000000000000..4a84665a088e --- /dev/null +++ b/openupgrade_scripts/scripts/website_event/17.0.1.4/pre-migration.py @@ -0,0 +1,30 @@ +# Copyright 2024 Tecnativa - Pilar Vargas +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from openupgradelib import openupgrade + +_xmlids_renames = [ + ( + "website_event_questions.constraint_event_registration_answer_value_check", + "website_event.constraint_event_registration_answer_value_check", + ), + ( + "website_event_questions.ir_rule_event_question_answer_event_user", + "website_event.ir_rule_event_question_answer_event_user", + ), + ( + "website_event_questions.ir_rule_event_question_answer_published", + "website_event.ir_rule_event_question_answer_published", + ), + ( + "website_event_questions.ir_rule_event_question_event_user", + "website_event.ir_rule_event_question_event_user", + ), + ( + "website_event_questions.ir_rule_event_question_published", + "website_event.ir_rule_event_question_published", + ), +] + + +def migrate(cr, version): + openupgrade.rename_xmlids(cr, _xmlids_renames) diff --git a/openupgrade_scripts/scripts/website_event/17.0.1.4/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/website_event/17.0.1.4/upgrade_analysis_work.txt new file mode 100644 index 000000000000..2aa5e3d0d026 --- /dev/null +++ b/openupgrade_scripts/scripts/website_event/17.0.1.4/upgrade_analysis_work.txt @@ -0,0 +1,102 @@ +---Models in module 'website_event'--- +model event.question (moved from website_event_questions) +model event.question.answer (moved from website_event_questions) +model event.registration.answer (moved from website_event_questions) +# Nothing to do + +---Fields in module 'website_event'--- +website_event / event.event / general_question_ids (one2many): previously in module website_event_questions +website_event / event.event / question_ids (one2many) : previously in module website_event_questions +website_event / event.event / specific_question_ids (one2many): previously in module website_event_questions +website_event / event.question / _order : previously in module website_event_questions +website_event / event.question / answer_ids (one2many) : previously in module website_event_questions +website_event / event.question / display_name (char) : previously in module website_event_questions +website_event / event.question / event_id (many2one) : previously in module website_event_questions +website_event / event.question / event_type_id (many2one) : previously in module website_event_questions +website_event / event.question / is_mandatory_answer (boolean) : previously in module website_event_questions +website_event / event.question / once_per_order (boolean) : previously in module website_event_questions +website_event / event.question / question_type (selection) : previously in module website_event_questions +website_event / event.question / sequence (integer) : previously in module website_event_questions +website_event / event.question / title (char) : previously in module website_event_questions +website_event / event.question.answer / _order : previously in module website_event_questions +website_event / event.question.answer / display_name (char) : previously in module website_event_questions +website_event / event.question.answer / name (char) : previously in module website_event_questions +website_event / event.question.answer / question_id (many2one) : previously in module website_event_questions +website_event / event.question.answer / sequence (integer) : previously in module website_event_questions +website_event / event.registration / registration_answer_choice_ids (one2many): NEW relation: event.registration.answer +website_event / event.registration / registration_answer_ids (one2many): previously in module website_event_questions +website_event / event.registration.answer / _order : previously in module website_event_questions +website_event / event.registration.answer / display_name (char) : previously in module website_event_questions +website_event / event.registration.answer / event_id (many2one) : previously in module website_event_questions +website_event / event.registration.answer / partner_id (many2one) : previously in module website_event_questions +website_event / event.registration.answer / question_id (many2one) : previously in module website_event_questions +website_event / event.registration.answer / question_type (selection) : previously in module website_event_questions +website_event / event.registration.answer / registration_id (many2one) : previously in module website_event_questions +website_event / event.registration.answer / value_answer_id (many2one) : previously in module website_event_questions +website_event / event.registration.answer / value_text_box (text) : previously in module website_event_questions +website_event / event.tag / is_published (boolean) : NEW hasdefault: default +website_event / event.tag / website_id (many2one) : NEW relation: website +website_event / event.tag.category / website_id (many2one) : NEW relation: website +website_event / event.tag.category / website_published (boolean) : not related anymore +website_event / event.tag.category / website_published (boolean) : now a function +website_event / event.type / question_ids (one2many) : previously in module website_event_questions +# Nothing to do + +---XML records in module 'website_event'--- +NEW ir.actions.act_window: website_event.action_event_registration_report [renamed from website_event_questions module] +NEW ir.asset: website_event.s_searchbar_000_js +NEW ir.asset: website_event.s_searchbar_000_xml +NEW ir.model.access: website_event.access_event_event_employee +NEW ir.model.access: website_event.access_event_event_portal +NEW ir.model.access: website_event.access_event_event_public +NEW ir.model.access: website_event.access_event_event_ticket_employee +NEW ir.model.access: website_event.access_event_event_ticket_portal +NEW ir.model.access: website_event.access_event_event_ticket_public +NEW ir.model.access: website_event.access_event_question_answer_employee +NEW ir.model.access: website_event.access_event_question_answer_portal +NEW ir.model.access: website_event.access_event_question_answer_public +NEW ir.model.access: website_event.access_event_question_answer_registration [renamed from website_event_questions module] +NEW ir.model.access: website_event.access_event_question_answer_user [renamed from website_event_questions module] +NEW ir.model.access: website_event.access_event_question_employee +NEW ir.model.access: website_event.access_event_question_portal +NEW ir.model.access: website_event.access_event_question_public +NEW ir.model.access: website_event.access_event_question_user [renamed from website_event_questions module] +NEW ir.model.access: website_event.access_event_registration_answer +NEW ir.model.access: website_event.access_event_tag_category_employee +NEW ir.model.access: website_event.access_event_tag_category_portal +NEW ir.model.access: website_event.access_event_tag_category_public +NEW ir.model.access: website_event.access_event_tag_employee +NEW ir.model.access: website_event.access_event_tag_portal +NEW ir.model.access: website_event.access_event_tag_public +NEW ir.model.access: website_event.access_website_event_menu_employee +NEW ir.model.access: website_event.access_website_event_menu_portal +NEW ir.model.access: website_event.access_website_event_menu_public +DEL ir.model.access: website_event.access_event_event +DEL ir.model.access: website_event.access_event_event_ticket +DEL ir.model.access: website_event.access_event_tag +DEL ir.model.access: website_event.access_event_tag_category +DEL ir.model.access: website_event.access_website_event_menu +# Nothing to do + +NEW ir.model.constraint: website_event.constraint_event_registration_answer_value_check [renamed from website_event_questions module] +NEW ir.rule: website_event.ir_rule_event_question_answer_event_user [renamed from website_event_questions module] (noupdate) +NEW ir.rule: website_event.ir_rule_event_question_answer_published [renamed from website_event_questions module] (noupdate) +NEW ir.rule: website_event.ir_rule_event_question_event_user [renamed from website_event_questions module] (noupdate) +NEW ir.rule: website_event.ir_rule_event_question_published [renamed from website_event_questions module] (noupdate) +# DONE: renamed in pre-migration + +NEW ir.ui.view: website_event.event_empty_events_svg +NEW ir.ui.view: website_event.event_question_view_form +NEW ir.ui.view: website_event.event_registration_answer_view_graph +NEW ir.ui.view: website_event.event_registration_answer_view_pivot +NEW ir.ui.view: website_event.event_registration_answer_view_search +NEW ir.ui.view: website_event.event_registration_answer_view_tree +NEW ir.ui.view: website_event.event_registration_view_kanban +NEW ir.ui.view: website_event.event_registration_view_search +NEW ir.ui.view: website_event.event_tag_view_form_inherit +NEW ir.ui.view: website_event.modal_ticket_registration +NEW ir.ui.view: website_event.navbar +NEW ir.ui.view: website_event.registration_event_question +DEL ir.ui.view: website_event.fold_register_details +DEL ir.ui.view: website_event.res_config_settings_view_form +# Nothing to do