diff --git a/docsource/modules180-190.rst b/docsource/modules180-190.rst index 9c3d0ccc576a..1e95c1cde9b7 100644 --- a/docsource/modules180-190.rst +++ b/docsource/modules180-190.rst @@ -1144,7 +1144,7 @@ Module coverage 18.0 -> 19.0 +---------------------------------------------------+----------------------+-------------------------------------------------+ | website_customer | | | +---------------------------------------------------+----------------------+-------------------------------------------------+ -| website_event | | | +| website_event |Done | | +---------------------------------------------------+----------------------+-------------------------------------------------+ | website_event_booth | | | +---------------------------------------------------+----------------------+-------------------------------------------------+ diff --git a/openupgrade_scripts/scripts/website_event/19.0.1.4/post-migration.py b/openupgrade_scripts/scripts/website_event/19.0.1.4/post-migration.py new file mode 100644 index 000000000000..5c78e0cf626d --- /dev/null +++ b/openupgrade_scripts/scripts/website_event/19.0.1.4/post-migration.py @@ -0,0 +1,9 @@ +# 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, "website_event", "19.0.1.4/noupdate_changes.xml") diff --git a/openupgrade_scripts/scripts/website_event/19.0.1.4/pre-migration.py b/openupgrade_scripts/scripts/website_event/19.0.1.4/pre-migration.py new file mode 100644 index 000000000000..9a9eb9398101 --- /dev/null +++ b/openupgrade_scripts/scripts/website_event/19.0.1.4/pre-migration.py @@ -0,0 +1,41 @@ +# Copyright 2026 Tecnativa - Pilar Vargas +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from openupgradelib import openupgrade + + +def _rename_location_menu_type(env): + openupgrade.copy_columns( + env.cr, + { + "website_event_menu": [ + ("menu_type", None, None), + ], + }, + ) + openupgrade.map_values( + env.cr, + openupgrade.get_legacy_name("menu_type"), + "menu_type", + [("location", "other")], + table="website_event_menu", + ) + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.add_columns( + env, + [("event.event", "is_seo_optimized", "boolean", False, "event_event")], + ) + openupgrade.logged_query( + env.cr, + """ + UPDATE event_event + SET is_seo_optimized = TRUE + WHERE website_meta_title IS NOT NULL + AND website_meta_description IS NOT NULL + AND website_meta_keywords IS NOT NULL + """, + ) + _rename_location_menu_type(env) diff --git a/openupgrade_scripts/scripts/website_event/19.0.1.4/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/website_event/19.0.1.4/upgrade_analysis_work.txt new file mode 100644 index 000000000000..ae93ed2bcecf --- /dev/null +++ b/openupgrade_scripts/scripts/website_event/19.0.1.4/upgrade_analysis_work.txt @@ -0,0 +1,75 @@ +---Models in module 'website_event'--- +# NOTHING TO DO + +---Fields in module 'website_event'--- +website_event / event.event / is_seo_optimized (boolean) : is now stored +# DONE: pre-migration precomputes stored is_seo_optimized values from existing event SEO metadata. + +website_event / website.event.menu / menu_type (selection) : selection_keys added: [other], removed: [location] +# DONE: pre-migration preserves the original menu_type values and maps 'location' to 'other'. + +website_event / event.event / location_menu_ids (one2many) : DEL relation: website.event.menu +website_event / event.event / other_menu_ids (one2many) : NEW relation: website.event.menu +# NOTHING TO DO: both fields use the same website_event_menu.event_id relation + +website_event / event.event / footer_visible (boolean) : NEW hasdefault: default +website_event / event.event / header_visible (boolean) : NEW hasdefault: default +website_event / event.event / location_menu (boolean) : DEL +website_event / website.event.menu / is_seo_optimized (boolean) : NEW isfunction: function, stored +website_event / website.event.menu / seo_name (char) : NEW translate +website_event / website.event.menu / website_meta_description (text): NEW translate +website_event / website.event.menu / website_meta_keywords (char) : NEW translate +website_event / website.event.menu / website_meta_og_img (char) : NEW +website_event / website.event.menu / website_meta_title (char) : NEW translate +# NOTHING TO DO: new display toggles and new menu SEO fields + +---XML records in module 'website_event'--- +DEL ir.asset: website_event.s_events_000_js +DEL ir.asset: website_event.s_searchbar_000_js +# NOTHING TO DO: obsolete frontend asset records removed upstream + +NEW ir.model.access: website_event.access_event_event_slot_employee +NEW ir.model.access: website_event.access_event_event_slot_portal +NEW ir.model.access: website_event.access_event_event_slot_public +NEW ir.rule: website_event.ir_rule_event_slot_public (noupdate) +# NOTHING TO DO: new ACLs/rule for event.slot website access, loaded by module update + +NEW ir.ui.view: website_event.dynamic_filter_template_event_event_single_aside +NEW ir.ui.view: website_event.dynamic_filter_template_event_event_single_badge +NEW ir.ui.view: website_event.dynamic_filter_template_event_event_single_card +NEW ir.ui.view: website_event.dynamic_filter_template_event_event_single_entry +NEW ir.ui.view: website_event.dynamic_filter_template_event_event_single_offset +NEW ir.ui.view: website_event.event_calendar_links +NEW ir.ui.view: website_event.event_event_view_form_website_create +NEW ir.ui.view: website_event.modal_slot_registration +NEW ir.ui.view: website_event.opt_event_calendar_block +NEW ir.ui.view: website_event.opt_event_dates_block +NEW ir.ui.view: website_event.opt_event_fixed_sidebar +NEW ir.ui.view: website_event.opt_event_location_block +NEW ir.ui.view: website_event.opt_event_organizer_block +NEW ir.ui.view: website_event.opt_event_registration_block +NEW ir.ui.view: website_event.opt_event_share_block +NEW ir.ui.view: website_event.s_dynamic_snippet_events_single_aside_preview_data +NEW ir.ui.view: website_event.s_dynamic_snippet_events_single_badge_preview_data +NEW ir.ui.view: website_event.s_dynamic_snippet_events_single_card_preview_data +NEW ir.ui.view: website_event.s_dynamic_snippet_events_single_entry_preview_data +NEW ir.ui.view: website_event.s_dynamic_snippet_events_single_offset_preview_data +NEW ir.ui.view: website_event.s_event_upcoming_snippet_card_preview_data +NEW ir.ui.view: website_event.s_events_card +NEW ir.ui.view: website_event.s_events_picture +NEW ir.ui.view: website_event.s_events_single_aside +NEW ir.ui.view: website_event.s_events_single_badge +NEW ir.ui.view: website_event.s_events_single_card +NEW ir.ui.view: website_event.s_events_single_entry +NEW ir.ui.view: website_event.s_events_single_offset +DEL ir.ui.view: website_event.404 +DEL ir.ui.view: website_event.default_page +DEL ir.ui.view: website_event.event_event_view_form_add +DEL ir.ui.view: website_event.event_searchbar_input_snippet_options +DEL ir.ui.view: website_event.events_search_box +DEL ir.ui.view: website_event.events_search_box_input +DEL ir.ui.view: website_event.s_dynamic_snippet_options_template +DEL ir.ui.view: website_event.s_events_options +DEL ir.ui.view: website_event.snippet_options +DEL ir.ui.view: website_event.template_location +# NOTHING TO DO: frontend templates/snippets were refactored in v19