Skip to content

Commit f489da8

Browse files
committed
Merge PR #108 into 18.0
Signed-off-by simahawk
2 parents 5c42053 + d9f0724 commit f489da8

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright 2025 Camptocamp SA
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
3+
4+
import logging
5+
6+
from odoo import SUPERUSER_ID, api
7+
8+
_logger = logging.getLogger(__name__)
9+
10+
11+
def migrate(cr, version):
12+
"""Force update endpoint_route table.
13+
14+
New params like `readonly` should be added to the stored routes.
15+
"""
16+
if not version:
17+
return
18+
env = api.Environment(cr, SUPERUSER_ID, {})
19+
model = env["endpoint.endpoint"]
20+
records = model.sudo().search([])
21+
records._handle_registry_sync()
22+
_logger.info("Forced endpoint route sync on %s records", model._name)

0 commit comments

Comments
 (0)