[FIX] website: clear cache when menu group is changed
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 02e01dce516 closes odoo/odoo#48065 X-original-commit: 0131e6d9103f68950ee23c6b0ef1af972370416e Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com> Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
This commit is contained in:
@@ -94,7 +94,7 @@ class Menu(models.Model):
|
||||
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user