"""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. 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)