Odoo Help


A simple group-by addition question in Products list view

Gil Bennoon
on 3/11/14, 11:40 AM 2,459 views

Apologies for the newbie question but I'm trying to add a 'group-by' option for the products list view.
Specifically - group-by seller (or supplier). Whenever I edit the searchview and add any of the seller related fields, I'm getting an error that the field is related and not database-persisted field. ("Fields in 'groupby' must be regular database-persisted fields (no function or related fields), or function fields with store=True").
This error came when I tried to add my group-by with the following line at the group-by area, right below the 'Type' default group-by (Copied the previous line and changed the "filter string" ad the "group_by" fields values):

<filter string="Seller" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'seller_ids'}"/>

My questions are:
1. How can I find which are the fields in a view (for example the product list view) can use for a group-by?
2. How can I group-by my products list by a supplier?

Thanks! Gil.



Sudhir Arya (ERP Harbor Consulting Services)

--Sudhir Arya (ERP Harbor Consulting Services)--
| 6 8 8
Ahmedabad, India
--Sudhir Arya (ERP Harbor Consulting Services)--

• Co-Founder & Co-Owner at ERP Harbor Consulting Services

• ERP Consultant / ERP Customization / TechnoFunctional Expert

• Sound knowledge in Python, Odoo (Open ERP), XML, PostgreSQL

• Domain knowledge of Sale Management, Purchase Management, Warehouse Management, Manufacturing, Multi Company Configuration & Management, HR Management, Medical Management, Construction Management, Education Management, Point of Sale, Third Party Integrations

• Positive attitude and quick Learner

• Good analytical skill, quick bug and issue tracing and find the solution

• Good knowledge and experience in payment gateway integration with Odoo

• Ready to accept new challenges

• Active Memeber On Stackoverflow 




Sudhir Arya
ERP Harbor Consulting Services
Sudhir Arya (ERP Harbor Consulting Services)
On 3/11/14, 12:46 PM

Hi Gil,

You cannot use one2many or many2many field in group by. You can only use these fields for simple search.


<field name="seller_ids" string="Sellers"/>

Hope this will help you.

Thanks Sudhir, I was wondering. Is there a way to find which fields ARE available for "Group-by"? And also - does that mean I cannot see products per their suppliers anywhere else in the system? Thanks!

Gil Bennoon
on 3/11/14, 1:24 PM

You can search it by Supplier name for that field.

&lt;field name="seller_ids"/&gt;

Sudhir Arya (ERP Harbor Consulting Services)
on 3/11/14, 4:03 PM

Thanks for the reply Sudhir, I am aware of the search function and was looking for a "Group by" function. We have about 30 suppliers and I was looking to show a list of all products grouped by each one of our suppliers. If I have to do a "search" I will have to do it 30 times and it will not be one list. Any idea how can I create a list of products (all of them in one list) divided by supplier?

Gil Bennoon
on 3/11/14, 4:16 PM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 3/11/14, 11:40 AM
Seen: 2459 times
Last updated: 3/16/15, 8:10 AM