Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docsource/modules180-190.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1238,7 +1238,7 @@ Module coverage 18.0 -> 19.0
+---------------------------------------------------+----------------------+-------------------------------------------------+
| website_sale_wishlist | | |
+---------------------------------------------------+----------------------+-------------------------------------------------+
| website_slides | | |
| website_slides |Done | |
+---------------------------------------------------+----------------------+-------------------------------------------------+
| website_slides_forum | | |
+---------------------------------------------------+----------------------+-------------------------------------------------+
Expand Down
Original file line number Diff line number Diff line change
@@ -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


@openupgrade.migrate()
def migrate(env, version):
openupgrade.load_data(env, "website_slides", "19.0.2.7/noupdate_changes.xml")
openupgrade.delete_records_safely_by_xml_id(
env,
["website_slides.mail_activity_data_access_request"],
)
openupgrade.delete_record_translations(
env.cr,
"website_slides",
["mail_notification_channel_invite"],
["arch_db"],
)
openupgrade.delete_record_translations(
env.cr,
"website_slides",
[
"mail_template_channel_completed",
"mail_template_channel_shared",
"slide_template_published",
"slide_template_shared",
],
["body_html"],
)
openupgrade.delete_record_translations(
env.cr,
"website_slides",
[
"rule_slide_channel_visibility_public_user",
"rule_slide_channel_visibility_signed_in_user",
"rule_slide_slide_public_user",
"rule_slide_slide_signed_in_user",
],
["name"],
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright 2026 Tecnativa - Pilar Vargas
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from openupgradelib import openupgrade


def _precompute_is_seo_optimized(env, model_name, table_name):
openupgrade.add_columns(
env,
[(model_name, "is_seo_optimized", "boolean", False, table_name)],
)
openupgrade.logged_query(
env.cr,
f"""
UPDATE {table_name}
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
""",
)


@openupgrade.migrate()
def migrate(env, version):
for model_name, table_name in [
("slide.channel", "slide_channel"),
("slide.slide", "slide_slide"),
]:
_precompute_is_seo_optimized(env, model_name, table_name)
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---Models in module 'website_slides'---
# NOTHING TO DO

---Fields in module 'website_slides'---
website_slides / mail.activity / request_partner_id (many2one) : previously in module mail
website_slides / slide.channel / visibility (selection) : selection_keys added: [link] (most likely nothing to do)
# NOTHING TO DO: field ownership/selection changes do not require data migration

website_slides / slide.channel / is_seo_optimized (boolean) : is now stored
website_slides / slide.slide / is_seo_optimized (boolean) : is now stored
Comment thread
pilarvargas-tecnativa marked this conversation as resolved.
# DONE: pre-migration precomputes stored is_seo_optimized values from existing SEO metadata

---XML records in module 'website_slides'---
NEW ir.ui.view: website_slides.course_card_information_badge
NEW ir.ui.view: website_slides.courses_home_side_bar
NEW ir.ui.view: website_slides.courses_my
NEW ir.ui.view: website_slides.courses_search_bar
NEW ir.ui.view: website_slides.courses_search_results
NEW ir.ui.view: website_slides.courses_search_tags
NEW ir.ui.view: website_slides.mail_activity_view_form
DEL ir.ui.view: website_slides.course_card_information_arrow
DEL ir.ui.view: website_slides.courses_all
DEL ir.ui.view: website_slides.slide_searchbar_input_snippet_options
DEL ir.ui.view: website_slides.snippet_options
NEW res.groups.privilege: website_slides.res_groups_privilege_elearning
# NOTHING TO DO

DEL mail.activity.type: website_slides.mail_activity_data_access_request (noupdate)
# DONE: remove obsolete noupdate mail.activity.type record in post-migration
Loading