[FIX] website: fix customize_template_get
broken by e11f23b
If not full, result was always empty
This commit fix the list of view when you click on Customize top menu in website.
This menu should only display the 'customize_show' views.
This commit is contained in:
@@ -180,10 +180,12 @@ class IrUiView(models.Model):
|
||||
user = self.env.user
|
||||
user_groups = set(user.groups_id)
|
||||
views = self.with_context(active_test=False)._views_get(key, bundles=bundles)
|
||||
|
||||
view_theme_id = self.env['ir.model.data'].xmlid_to_res_id('website.theme')
|
||||
done = set()
|
||||
result = []
|
||||
for view in views:
|
||||
if full:
|
||||
if full or (view.customize_show and view.inherit_id.id != view_theme_id):
|
||||
if not user_groups.issuperset(view.groups_id):
|
||||
continue
|
||||
if view.inherit_id not in done:
|
||||
|
||||
Reference in New Issue
Block a user