Skip to content

Commit 818d7c0

Browse files
committed
[FIX] website: update website_menu record rule domain for Odoo 19
1 parent 310034c commit 818d7c0

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
from openupgradelib import openupgrade
2+
3+
@openupgrade.migrate()
4+
def migrate(env, version):
5+
openupgrade.logged_query(
6+
env.cr,
7+
"""
8+
UPDATE ir_rule
9+
SET domain_force = '["|", ("group_ids", "=", False), ("group_ids", "in", user.all_group_ids.ids)]'
10+
WHERE id IN (
11+
SELECT res_id
12+
FROM ir_model_data
13+
WHERE model = 'ir.rule'
14+
AND module = 'website'
15+
AND name = 'website_menu'
16+
)
17+
"""
18+
)

0 commit comments

Comments
 (0)