Skip to content

Commit 8d64568

Browse files
committed
[14.0][ADD] product_attribute_groupby_filter
1 parent 9334ee1 commit 8d64568

24 files changed

+1678
-0
lines changed
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
================================
2+
Product Attribute Groupby Filter
3+
================================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:1fa29ea1eced64c6a99479bb021207efe4299dd2cf0f79110675289cab78d380
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github
20+
:target: https://github.com/OCA/product-attribute/tree/14.0/product_attribute_groupby_filter
21+
:alt: OCA/product-attribute
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/product-attribute-14-0/product-attribute-14-0-product_attribute_groupby_filter
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=14.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
This module adds a **"Group by Attribute"** option to the searchbar of the
32+
``product.product`` list view. It allows users to dynamically group product
33+
variants by any attribute value (e.g. Size → S / M / L, Color → Red / Blue)
34+
directly from the Group By menu, without requiring dedicated groupby fields for
35+
each attribute.
36+
37+
Up to **3 simultaneous attribute groupings** are supported.
38+
39+
**Table of contents**
40+
41+
.. contents::
42+
:local:
43+
44+
Usage
45+
=====
46+
47+
* **Dynamic Group By**: group ``product.product`` records by any
48+
``product.attribute`` value from the searchbar Group By menu.
49+
* **Multi-level grouping**: combine up to 3 attribute groupings, optionally
50+
combined with native Odoo groupBy fields.
51+
* **Sort order**: attribute values can be sorted by *sequence* (default) or
52+
*alphabetically*, configurable in settings.
53+
* **Exclude from Group By**: individual attributes can be excluded from the
54+
widget via a dedicated flag on the attribute form.
55+
56+
Bug Tracker
57+
===========
58+
59+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/product-attribute/issues>`_.
60+
In case of trouble, please check there if your issue has already been reported.
61+
If you spotted it first, help us to smash it by providing a detailed and welcomed
62+
`feedback <https://github.com/OCA/product-attribute/issues/new?body=module:%20product_attribute_groupby_filter%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
63+
64+
Do not contact contributors directly about support or help with technical issues.
65+
66+
Credits
67+
=======
68+
69+
Authors
70+
~~~~~~~
71+
72+
* Akretion
73+
74+
Contributors
75+
~~~~~~~~~~~~
76+
77+
* Kévin Roche <kevin.roche@akretion.com>
78+
79+
Maintainers
80+
~~~~~~~~~~~
81+
82+
This module is maintained by the OCA.
83+
84+
.. image:: https://odoo-community.org/logo.png
85+
:alt: Odoo Community Association
86+
:target: https://odoo-community.org
87+
88+
OCA, or the Odoo Community Association, is a nonprofit organization whose
89+
mission is to support the collaborative development of Odoo features and
90+
promote its widespread use.
91+
92+
.. |maintainer-Kev-Roche| image:: https://github.com/Kev-Roche.png?size=40px
93+
:target: https://github.com/Kev-Roche
94+
:alt: Kev-Roche
95+
96+
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
97+
98+
|maintainer-Kev-Roche|
99+
100+
This module is part of the `OCA/product-attribute <https://github.com/OCA/product-attribute/tree/14.0/product_attribute_groupby_filter>`_ project on GitHub.
101+
102+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Copyright 2026 Akretion (https://www.akretion.com).
2+
# @author Kévin Roche <kevin.roche@akretion.com>
3+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
4+
5+
{
6+
"name": "Product Attribute Groupby Filter",
7+
"summary": "Allow grouping by attributes in product tree view.",
8+
"version": "14.0.0.1.0",
9+
"category": "product",
10+
"website": "https://github.com/OCA/product-attribute",
11+
"author": "Akretion, Odoo Community Association (OCA)",
12+
"license": "AGPL-3",
13+
"maintainers": ["Kev-Roche"],
14+
"application": False,
15+
"installable": True,
16+
"depends": [
17+
"product",
18+
],
19+
"data": [
20+
"views/assets.xml",
21+
"views/product_attribute.xml",
22+
"views/product_product.xml",
23+
"views/res_config_settings.xml",
24+
],
25+
"qweb": [
26+
"static/src/xml/product_attribute_groupby.xml",
27+
],
28+
}
Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * product_attribute_groupby_filter
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 14.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"POT-Creation-Date: 2026-03-13 21:43+0000\n"
10+
"PO-Revision-Date: 2026-03-13 22:48+0100\n"
11+
"Last-Translator: \n"
12+
"Language-Team: \n"
13+
"Language: fr\n"
14+
"MIME-Version: 1.0\n"
15+
"Content-Type: text/plain; charset=UTF-8\n"
16+
"Content-Transfer-Encoding: 8bit\n"
17+
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
18+
"X-Generator: Poedit 3.9\n"
19+
20+
#. module: product_attribute_groupby_filter
21+
#. openerp-web
22+
#: code:addons/product_attribute_groupby_filter/static/src/xml/product_attribute_groupby.xml:0
23+
#, python-format
24+
msgid "Apply"
25+
msgstr "Appliquer"
26+
27+
#. module: product_attribute_groupby_filter
28+
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_product_product__attribute_group_by_1
29+
msgid "Attribute Group By 1"
30+
msgstr ""
31+
32+
#. module: product_attribute_groupby_filter
33+
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_product_product__attribute_group_by_2
34+
msgid "Attribute Group By 2"
35+
msgstr ""
36+
37+
#. module: product_attribute_groupby_filter
38+
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_product_product__attribute_group_by_3
39+
msgid "Attribute Group By 3"
40+
msgstr ""
41+
42+
#. module: product_attribute_groupby_filter
43+
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_res_company__product_groupby_attribute_sort
44+
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_res_config_settings__product_groupby_attribute_sort
45+
msgid "Attribute Group By Sort Order"
46+
msgstr "Ordre de Regrouper par Caractéristique"
47+
48+
#. module: product_attribute_groupby_filter
49+
#: model_terms:ir.ui.view,arch_db:product_attribute_groupby_filter.product_product_view_search_attribute_groupby
50+
msgid "Attribute Value 1"
51+
msgstr ""
52+
53+
#. module: product_attribute_groupby_filter
54+
#: model_terms:ir.ui.view,arch_db:product_attribute_groupby_filter.product_product_view_search_attribute_groupby
55+
msgid "Attribute Value 2"
56+
msgstr ""
57+
58+
#. module: product_attribute_groupby_filter
59+
#: model_terms:ir.ui.view,arch_db:product_attribute_groupby_filter.product_product_view_search_attribute_groupby
60+
msgid "Attribute Value 3"
61+
msgstr ""
62+
63+
#. module: product_attribute_groupby_filter
64+
#: model_terms:ir.ui.view,arch_db:product_attribute_groupby_filter.res_config_settings_view_form_groupby
65+
msgid "Attribute values sort order"
66+
msgstr "Ordre de Tri des Valeurs de Caractéristique"
67+
68+
#. module: product_attribute_groupby_filter
69+
#: model:ir.model,name:product_attribute_groupby_filter.model_res_company
70+
msgid "Companies"
71+
msgstr "Sociétés"
72+
73+
#. module: product_attribute_groupby_filter
74+
#: model:ir.model,name:product_attribute_groupby_filter.model_res_config_settings
75+
msgid "Config Settings"
76+
msgstr "Paramètres de configuration"
77+
78+
#. module: product_attribute_groupby_filter
79+
#: model:ir.model.fields,help:product_attribute_groupby_filter.field_res_config_settings__product_groupby_attribute_sort
80+
msgid ""
81+
"Defines the sort order applied to attribute values when grouping products "
82+
"by attribute in the searchbar.\n"
83+
"- Sequence: values are sorted by their sequence field.\n"
84+
"- Name: values are sorted alphabetically."
85+
msgstr ""
86+
"Définit l'ordre de tri appliqué aux valeurs d'attribut lors du regroupement "
87+
"des produits par attribut dans la barre de recherche.\n"
88+
" - Séquence : les valeurs sont triées en fonction de leur séquence. \n"
89+
"- Nom : les valeurs sont triées par ordre alphabétique."
90+
91+
#. module: product_attribute_groupby_filter
92+
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_product_attribute__display_name
93+
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_product_product__display_name
94+
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_res_company__display_name
95+
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_res_config_settings__display_name
96+
msgid "Display Name"
97+
msgstr "Nom affiché"
98+
99+
#. module: product_attribute_groupby_filter
100+
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_product_attribute__exclude_from_groupby
101+
msgid "Exclude from Group By"
102+
msgstr "Exclure du filtre regrouper par Caractéristique"
103+
104+
#. module: product_attribute_groupby_filter
105+
#. openerp-web
106+
#: code:addons/product_attribute_groupby_filter/static/src/xml/product_attribute_groupby.xml:0
107+
#, python-format
108+
msgid "Group by Attribute"
109+
msgstr "Regrouper par Caractéristique"
110+
111+
#. module: product_attribute_groupby_filter
112+
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_product_attribute__id
113+
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_product_product__id
114+
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_res_company__id
115+
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_res_config_settings__id
116+
msgid "ID"
117+
msgstr "Identifiant"
118+
119+
#. module: product_attribute_groupby_filter
120+
#: model:ir.model.fields,help:product_attribute_groupby_filter.field_product_attribute__exclude_from_groupby
121+
msgid ""
122+
"If checked, this attribute will not appear in the 'Group by attribute' "
123+
"search menu."
124+
msgstr ""
125+
"Si coché, cette caractéristique n'apparait pas dans le filtre regrouper par "
126+
"Caractéristique."
127+
128+
#. module: product_attribute_groupby_filter
129+
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_product_attribute____last_update
130+
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_product_product____last_update
131+
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_res_company____last_update
132+
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_res_config_settings____last_update
133+
msgid "Last Modified on"
134+
msgstr "Dernière modification le"
135+
136+
#. module: product_attribute_groupby_filter
137+
#: model:ir.model.fields.selection,name:product_attribute_groupby_filter.selection__res_company__product_groupby_attribute_sort__name
138+
msgid "Name"
139+
msgstr ""
140+
141+
#. module: product_attribute_groupby_filter
142+
#: model:ir.model,name:product_attribute_groupby_filter.model_product_product
143+
msgid "Product"
144+
msgstr "Article"
145+
146+
#. module: product_attribute_groupby_filter
147+
#: model:ir.model,name:product_attribute_groupby_filter.model_product_attribute
148+
msgid "Product Attribute"
149+
msgstr "Caractéristique de l'article"
150+
151+
#. module: product_attribute_groupby_filter
152+
#: model:ir.model.fields.selection,name:product_attribute_groupby_filter.selection__res_company__product_groupby_attribute_sort__sequence
153+
msgid "Sequence"
154+
msgstr ""
155+
156+
#. module: product_attribute_groupby_filter
157+
#: model_terms:ir.ui.view,arch_db:product_attribute_groupby_filter.res_config_settings_view_form_groupby
158+
msgid ""
159+
"Sort order applied to attribute values when\n"
160+
" grouping products by attribute in the searchbar."
161+
msgstr ""
162+
163+
#. module: product_attribute_groupby_filter
164+
#: model:ir.model.fields,help:product_attribute_groupby_filter.field_product_product__attribute_group_by_1
165+
msgid "Technical field for attribute groupBy slot 1."
166+
msgstr ""
167+
168+
#. module: product_attribute_groupby_filter
169+
#: model:ir.model.fields,help:product_attribute_groupby_filter.field_product_product__attribute_group_by_2
170+
msgid "Technical field for attribute groupBy slot 2."
171+
msgstr ""
172+
173+
#. module: product_attribute_groupby_filter
174+
#: model:ir.model.fields,help:product_attribute_groupby_filter.field_product_product__attribute_group_by_3
175+
msgid "Technical field for attribute groupBy slot 3."
176+
msgstr ""
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from . import product_attribute
2+
from . import product_product
3+
from . import res_company
4+
from . import res_config_settings
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright 2026 Akretion (https://www.akretion.com).
2+
# @author Kévin Roche <kevin.roche@akretion.com>
3+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
4+
5+
from odoo import fields, models
6+
7+
8+
class ProductAttribute(models.Model):
9+
_inherit = "product.attribute"
10+
11+
exclude_from_groupby = fields.Boolean(
12+
string="Exclude from Group By",
13+
default=False,
14+
help="If checked, this attribute will not appear in the "
15+
" 'Group by attribute' search menu.",
16+
)

0 commit comments

Comments
 (0)