diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index 32936518028..01297e70bb1 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -743,6 +743,11 @@ instance.web.Sidebar = instance.web.Widget.extend({ var self = this; self.$element.html(QWeb.render('Sidebar', {widget: self})); this.$element.find('ul').hide(); + + // Hides Sidebar sections when item list is empty + this.$('.oe_form_dropdown_section').each(function() { + $(this).toggle(!!$(this).find('li').length); + }); }, /** * For each item added to the section: