Skip to content

Commit

Permalink
[FIX] website: clear cache when menu group is changed
Browse files Browse the repository at this point in the history
Otherwise, `_get_menu_ids()` won't be recomputed, meaning removing a group from
a menu won't make it appear for restricted user, and adding a group on a menu
won't hide that menu, until a clear cache occurs.

Introduced with 02e01dc

closes odoo#47947

Signed-off-by: Jérémy Kersten (jke) <[email protected]>
  • Loading branch information
rdeodoo committed Mar 18, 2020
1 parent 10abdf7 commit 4c6e860
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/website/models/website_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def create(self, vals):

def write(self, values):
res = super().write(values)
if 'website_id' in values:
if 'website_id' in values or 'group_ids' in values:
self.clear_caches()
return res

Expand Down

0 comments on commit 4c6e860

Please sign in to comment.