Alaguraj0361 0f462ad21a
Some checks failed
CI / Brand-leak check (push) Has been cancelled
CI / flake8 / pylint-odoo / manifest completeness (push) Has been cancelled
CI / Install all modules with --test-enable (push) Has been cancelled
add TNCSC deployment module, community add-ons, role guides, and website navigation overrides
2026-09-28 19:43:48 +05:30

17 lines
663 B
Python

"""Reload the seeded website pages from views/website_pages.xml.
That file is noupdate="1" so edits made in the website editor survive
upgrades, but it also means upgrades never deliver template fixes or new pages
(here: /membership/join, /membership/thank-you, dynamic event links, and captcha fixes).
Loading it once in 'init' mode rewrites the existing page views.
Runs before the module's data is loaded.
"""
from odoo import SUPERUSER_ID, api
from odoo.tools import convert_file
def migrate(cr, version):
env = api.Environment(cr, SUPERUSER_ID, {})
convert_file(env, 'tncsc_deployment', 'views/website_pages.xml', {}, mode='init', noupdate=True)