Skip to content
Snippets Groups Projects
Commit 8da3276e authored by Nicolas Lempereur's avatar Nicolas Lempereur
Browse files

[FIX] website: changing menu sequence clear menu cache


As of 02e01dce the website menu is prefetched for the user and saved
in cache.

If the sequence of a menu is changed (eg. with the "Edit Menu" modal on
website), the cache was not cleared so it seemed like this did not work.

With this changeset, changing a menu sequence will clear ormcache.

opw-2244908
closes #50683

Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
parent 2f83c5ba
Branches
Tags
No related merge requests found
......@@ -94,7 +94,7 @@ class Menu(models.Model):
def write(self, values):
res = super().write(values)
if 'website_id' in values or 'group_ids' in values:
if 'website_id' in values or 'group_ids' in values or 'sequence' in values:
self.clear_caches()
return res
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment