Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 102 additions & 0 deletions product_attribute_groupby_filter/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
================================
Product Attribute Groupby Filter
================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:1fa29ea1eced64c6a99479bb021207efe4299dd2cf0f79110675289cab78d380
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github
:target: https://github.com/OCA/product-attribute/tree/14.0/product_attribute_groupby_filter
:alt: OCA/product-attribute
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/product-attribute-14-0/product-attribute-14-0-product_attribute_groupby_filter
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=14.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module adds a **"Group by Attribute"** option to the searchbar of the
``product.product`` list view. It allows users to dynamically group product
variants by any attribute value (e.g. Size → S / M / L, Color → Red / Blue)
directly from the Group By menu, without requiring dedicated groupby fields for
each attribute.

Up to **3 simultaneous attribute groupings** are supported.

**Table of contents**

.. contents::
:local:

Usage
=====

* **Dynamic Group By**: group ``product.product`` records by any
``product.attribute`` value from the searchbar Group By menu.
* **Multi-level grouping**: combine up to 3 attribute groupings, optionally
combined with native Odoo groupBy fields.
* **Sort order**: attribute values can be sorted by *sequence* (default) or
*alphabetically*, configurable in settings.
* **Exclude from Group By**: individual attributes can be excluded from the
widget via a dedicated flag on the attribute form.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/product-attribute/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`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**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Akretion

Contributors
~~~~~~~~~~~~

* Kévin Roche <kevin.roche@akretion.com>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-Kev-Roche| image:: https://github.com/Kev-Roche.png?size=40px
:target: https://github.com/Kev-Roche
:alt: Kev-Roche

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-Kev-Roche|

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.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions product_attribute_groupby_filter/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
28 changes: 28 additions & 0 deletions product_attribute_groupby_filter/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright 2026 Akretion (https://www.akretion.com).
# @author Kévin Roche <kevin.roche@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Product Attribute Groupby Filter",
"summary": "Allow grouping by attributes in product tree view.",
"version": "14.0.0.1.0",
"category": "product",
"website": "https://github.com/OCA/product-attribute",
"author": "Akretion, Odoo Community Association (OCA)",
"license": "AGPL-3",
"maintainers": ["Kev-Roche"],
"application": False,
"installable": True,
"depends": [
"product",
],
"data": [
"views/assets.xml",
"views/product_attribute.xml",
"views/product_product.xml",
"views/res_config_settings.xml",
],
"qweb": [
"static/src/xml/product_attribute_groupby.xml",
],
}
176 changes: 176 additions & 0 deletions product_attribute_groupby_filter/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_attribute_groupby_filter
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-03-13 21:43+0000\n"
"PO-Revision-Date: 2026-03-13 22:48+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Poedit 3.9\n"

#. module: product_attribute_groupby_filter
#. openerp-web
#: code:addons/product_attribute_groupby_filter/static/src/xml/product_attribute_groupby.xml:0
#, python-format
msgid "Apply"
msgstr "Appliquer"

#. module: product_attribute_groupby_filter
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_product_product__attribute_group_by_1
msgid "Attribute Group By 1"
msgstr ""

#. module: product_attribute_groupby_filter
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_product_product__attribute_group_by_2
msgid "Attribute Group By 2"
msgstr ""

#. module: product_attribute_groupby_filter
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_product_product__attribute_group_by_3
msgid "Attribute Group By 3"
msgstr ""

#. module: product_attribute_groupby_filter
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_res_company__product_groupby_attribute_sort
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_res_config_settings__product_groupby_attribute_sort
msgid "Attribute Group By Sort Order"
msgstr "Ordre de Regrouper par Caractéristique"

#. module: product_attribute_groupby_filter
#: model_terms:ir.ui.view,arch_db:product_attribute_groupby_filter.product_product_view_search_attribute_groupby
msgid "Attribute Value 1"
msgstr ""

#. module: product_attribute_groupby_filter
#: model_terms:ir.ui.view,arch_db:product_attribute_groupby_filter.product_product_view_search_attribute_groupby
msgid "Attribute Value 2"
msgstr ""

#. module: product_attribute_groupby_filter
#: model_terms:ir.ui.view,arch_db:product_attribute_groupby_filter.product_product_view_search_attribute_groupby
msgid "Attribute Value 3"
msgstr ""

#. module: product_attribute_groupby_filter
#: model_terms:ir.ui.view,arch_db:product_attribute_groupby_filter.res_config_settings_view_form_groupby
msgid "Attribute values sort order"
msgstr "Ordre de Tri des Valeurs de Caractéristique"

#. module: product_attribute_groupby_filter
#: model:ir.model,name:product_attribute_groupby_filter.model_res_company
msgid "Companies"
msgstr "Sociétés"

#. module: product_attribute_groupby_filter
#: model:ir.model,name:product_attribute_groupby_filter.model_res_config_settings
msgid "Config Settings"
msgstr "Paramètres de configuration"

#. module: product_attribute_groupby_filter
#: model:ir.model.fields,help:product_attribute_groupby_filter.field_res_config_settings__product_groupby_attribute_sort
msgid ""
"Defines the sort order applied to attribute values when grouping products "
"by attribute in the searchbar.\n"
"- Sequence: values are sorted by their sequence field.\n"
"- Name: values are sorted alphabetically."
msgstr ""
"Définit l'ordre de tri appliqué aux valeurs d'attribut lors du regroupement "
"des produits par attribut dans la barre de recherche.\n"
" - Séquence : les valeurs sont triées en fonction de leur séquence. \n"
"- Nom : les valeurs sont triées par ordre alphabétique."

#. module: product_attribute_groupby_filter
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_product_attribute__display_name
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_product_product__display_name
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_res_company__display_name
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_res_config_settings__display_name
msgid "Display Name"
msgstr "Nom affiché"

#. module: product_attribute_groupby_filter
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_product_attribute__exclude_from_groupby
msgid "Exclude from Group By"
msgstr "Exclure du filtre regrouper par Caractéristique"

#. module: product_attribute_groupby_filter
#. openerp-web
#: code:addons/product_attribute_groupby_filter/static/src/xml/product_attribute_groupby.xml:0
#, python-format
msgid "Group by Attribute"
msgstr "Regrouper par Caractéristique"

#. module: product_attribute_groupby_filter
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_product_attribute__id
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_product_product__id
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_res_company__id
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_res_config_settings__id
msgid "ID"
msgstr "Identifiant"

#. module: product_attribute_groupby_filter
#: model:ir.model.fields,help:product_attribute_groupby_filter.field_product_attribute__exclude_from_groupby
msgid ""
"If checked, this attribute will not appear in the 'Group by attribute' "
"search menu."
msgstr ""
"Si coché, cette caractéristique n'apparait pas dans le filtre regrouper par "
"Caractéristique."

#. module: product_attribute_groupby_filter
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_product_attribute____last_update
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_product_product____last_update
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_res_company____last_update
#: model:ir.model.fields,field_description:product_attribute_groupby_filter.field_res_config_settings____last_update
msgid "Last Modified on"
msgstr "Dernière modification le"

#. module: product_attribute_groupby_filter
#: model:ir.model.fields.selection,name:product_attribute_groupby_filter.selection__res_company__product_groupby_attribute_sort__name
msgid "Name"
msgstr ""

#. module: product_attribute_groupby_filter
#: model:ir.model,name:product_attribute_groupby_filter.model_product_product
msgid "Product"
msgstr "Article"

#. module: product_attribute_groupby_filter
#: model:ir.model,name:product_attribute_groupby_filter.model_product_attribute
msgid "Product Attribute"
msgstr "Caractéristique de l'article"

#. module: product_attribute_groupby_filter
#: model:ir.model.fields.selection,name:product_attribute_groupby_filter.selection__res_company__product_groupby_attribute_sort__sequence
msgid "Sequence"
msgstr ""

#. module: product_attribute_groupby_filter
#: model_terms:ir.ui.view,arch_db:product_attribute_groupby_filter.res_config_settings_view_form_groupby
msgid ""
"Sort order applied to attribute values when\n"
" grouping products by attribute in the searchbar."
msgstr ""

#. module: product_attribute_groupby_filter
#: model:ir.model.fields,help:product_attribute_groupby_filter.field_product_product__attribute_group_by_1
msgid "Technical field for attribute groupBy slot 1."
msgstr ""

#. module: product_attribute_groupby_filter
#: model:ir.model.fields,help:product_attribute_groupby_filter.field_product_product__attribute_group_by_2
msgid "Technical field for attribute groupBy slot 2."
msgstr ""

#. module: product_attribute_groupby_filter
#: model:ir.model.fields,help:product_attribute_groupby_filter.field_product_product__attribute_group_by_3
msgid "Technical field for attribute groupBy slot 3."
msgstr ""
4 changes: 4 additions & 0 deletions product_attribute_groupby_filter/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from . import product_attribute
from . import product_product
from . import res_company
from . import res_config_settings
16 changes: 16 additions & 0 deletions product_attribute_groupby_filter/models/product_attribute.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2026 Akretion (https://www.akretion.com).
# @author Kévin Roche <kevin.roche@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


class ProductAttribute(models.Model):
_inherit = "product.attribute"

exclude_from_groupby = fields.Boolean(
string="Exclude from Group By",
default=False,
help="If checked, this attribute will not appear in the "
" 'Group by attribute' search menu.",
)
Loading
Loading