diff --git a/web_filter_header_button/README.rst b/web_filter_header_button/README.rst
index 80879470a..da297cb29 100644
--- a/web_filter_header_button/README.rst
+++ b/web_filter_header_button/README.rst
@@ -7,7 +7,7 @@ Filter Button
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- !! source digest: sha256:9da8b47931a94c1b0a4f43e7a450e88a87095f7d1d6aa5fdf36fc59efbb75fe4
+ !! source digest: sha256:e9f3e0db2c52f42eb3e177ee261caec02d793b0102a7d5159c4c163381fd13b4
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -95,6 +95,10 @@ Known issues / Roadmap
limiting in some cases. Keep it in mind or use
``base_view_inheritance_extension`` if you want to use proper context
inheritance.
+- Another nice to have would be to be able to hide the filters in the
+ filter list to be able to show them just in the header, although
+ there's not a straigh forward way to do it and it could lead to side
+ effects.
Bug Tracker
===========
diff --git a/web_filter_header_button/demo/ir_module_module_view.xml b/web_filter_header_button/demo/ir_module_module_view.xml
index 77773bbe8..1742e196d 100644
--- a/web_filter_header_button/demo/ir_module_module_view.xml
+++ b/web_filter_header_button/demo/ir_module_module_view.xml
@@ -14,6 +14,11 @@
name="context"
>{'shown_in_panel': {'icon': 'fa-toggle-off', 'hotkey': 'u'}}
+
+ {'group_by':'state', 'shown_in_panel': {'icon': 'fa-th-list', 'hotkey': 's'}}
+
diff --git a/web_filter_header_button/readme/ROADMAP.md b/web_filter_header_button/readme/ROADMAP.md
index 804bf5e48..b91b7003b 100644
--- a/web_filter_header_button/readme/ROADMAP.md
+++ b/web_filter_header_button/readme/ROADMAP.md
@@ -1,2 +1,5 @@
- Group filters by kind
- As we use the `context` attribute, the inheritance could be limiting in some cases. Keep it in mind or use `base_view_inheritance_extension` if you want to use proper context inheritance.
+- Another nice to have would be to be able to hide the filters in the filter list to be
+ able to show them just in the header, although there's not a straigh forward way to
+ do it and it could lead to side effects.
diff --git a/web_filter_header_button/static/description/index.html b/web_filter_header_button/static/description/index.html
index f80e0c98e..5c83a13af 100644
--- a/web_filter_header_button/static/description/index.html
+++ b/web_filter_header_button/static/description/index.html
@@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!! source digest: sha256:9da8b47931a94c1b0a4f43e7a450e88a87095f7d1d6aa5fdf36fc59efbb75fe4
+!! source digest: sha256:e9f3e0db2c52f42eb3e177ee261caec02d793b0102a7d5159c4c163381fd13b4
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

This module allows to add some selected filters as buttons in the header
@@ -436,6 +436,10 @@ following the Configure section.
limiting in some cases. Keep it in mind or use
base_view_inheritance_extension if you want to use proper context
inheritance.
+Another nice to have would be to be able to hide the filters in the
+filter list to be able to show them just in the header, although
+there’s not a straigh forward way to do it and it could lead to side
+effects.
diff --git a/web_filter_header_button/static/src/control_panel/control_panel.xml b/web_filter_header_button/static/src/control_panel/control_panel.xml
index 7a11ebf55..93ce85281 100644
--- a/web_filter_header_button/static/src/control_panel/control_panel.xml
+++ b/web_filter_header_button/static/src/control_panel/control_panel.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/web_filter_header_button/static/src/control_panel/control_panel_model_extension.esm.js b/web_filter_header_button/static/src/control_panel/control_panel_model_extension.esm.js
index 57716199d..c08124e43 100644
--- a/web_filter_header_button/static/src/control_panel/control_panel_model_extension.esm.js
+++ b/web_filter_header_button/static/src/control_panel/control_panel_model_extension.esm.js
@@ -32,5 +32,17 @@ patch(
}
return preFilter;
},
+ /**
+ * Allow groupBy filters to show up as buttons
+ * @override
+ * @param {Object} filter
+ * @param {Object} attrs
+ */
+ _extractAttributes(filter, attrs) {
+ this._super(...arguments);
+ if (filter.type === "groupBy" && attrs.context.shown_in_panel) {
+ filter.context = attrs.context;
+ }
+ },
}
);
diff --git a/web_filter_header_button/static/src/filter_button/filter_button.esm.js b/web_filter_header_button/static/src/filter_button/filter_button.esm.js
index a7499b571..b0881432f 100644
--- a/web_filter_header_button/static/src/filter_button/filter_button.esm.js
+++ b/web_filter_header_button/static/src/filter_button/filter_button.esm.js
@@ -30,6 +30,9 @@ export class FilterButton extends Component {
favorite: {
color: "warning",
},
+ groupBy: {
+ color: "info",
+ },
};
return mapping[filter.type];
}
diff --git a/web_filter_header_button/static/src/filter_button/filter_button.xml b/web_filter_header_button/static/src/filter_button/filter_button.xml
index 425bd508d..fcdf2f2b4 100644
--- a/web_filter_header_button/static/src/filter_button/filter_button.xml
+++ b/web_filter_header_button/static/src/filter_button/filter_button.xml
@@ -3,36 +3,38 @@
-