oca-website/odoo-bringout-oca-website-website_cookiebot/website_cookiebot/migrations/16.0.2.0.0/post-migrate.py
2025-08-29 15:43:06 +02:00

10 lines
401 B
Python

# Copyright 2024 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from openupgradelib import openupgrade
@openupgrade.migrate()
def migrate(env, version):
# We're adding cookiebot_enabled to the website so it's easier to disable the
# cookiebot scripts temporarily
env["website"].search([("cookiebot_dgid", "!=", False)]).cookiebot_enabled = True