"""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 (here: broken and placeholder links). Loading it once in 'init' mode rewrites the existing page views. Any website-editor changes to these pages are overwritten by this upgrade. Runs before the module's data is loaded so the header overrides in views/website_header_overrides.xml are validated against current pages. """ 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)