Skip to content
Merged
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
21 changes: 21 additions & 0 deletions openupgrade_scripts/scripts/website/16.0.1.0/end-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,28 @@ def convert_field_html_string_bootstrap_4to5(env):
)


def rename_t_group_website_restricted_editor(env):
"""Locate group directives in custom views with the former `group_website_publisher`
group which is now renamed to `group_website_restricted_editor`. For example, the
website_partner.partner_detail template"""
views = env["ir.ui.view"].search(
[
(
"arch_db",
"ilike",
"website.group_website_publisher",
),
("website_id", "!=", False),
]
)
for view in views:
view.arch_db = view.arch_db.replace(
"website.group_website_publisher", "website.group_website_restricted_editor"
)


@openupgrade.migrate()
def migrate(env, version):
convert_custom_qweb_templates_bootstrap_4to5(env)
convert_field_html_string_bootstrap_4to5(env)
rename_t_group_website_restricted_editor(env)