mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[REF] web_dashboard_tile: Black python code
This commit is contained in:
@@ -8,10 +8,12 @@ def migrate(cr, version):
|
||||
return
|
||||
|
||||
# Update ir.rule
|
||||
cr.execute("""
|
||||
cr.execute(
|
||||
"""
|
||||
SELECT res_id FROM ir_model_data
|
||||
WHERE name = 'model_tile_rule'
|
||||
AND module = 'web_dashboard_tile'""")
|
||||
AND module = 'web_dashboard_tile'"""
|
||||
)
|
||||
rule_id = cr.fetchone()[0]
|
||||
new_domain = """[
|
||||
"|",
|
||||
@@ -21,6 +23,9 @@ def migrate(cr, version):
|
||||
("group_ids","=",False),
|
||||
("group_ids","in",[g.id for g in user.groups_id]),
|
||||
]"""
|
||||
cr.execute("""
|
||||
cr.execute(
|
||||
"""
|
||||
UPDATE ir_rule SET domain_force = '%(domain)s'
|
||||
WHERE id = '%(id)s' """ % {'domain': new_domain, 'id': rule_id})
|
||||
WHERE id = '%(id)s' """
|
||||
% {"domain": new_domain, "id": rule_id}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user