Odoo Help


v.8 How to show the average in list view groups

Gregor Heger
on 3/26/16, 11:10 AM 881 views


by clicking on a group in a search view, the records in the list view get grouped. The records representing a group automatically sums integer or float fields. But is there a way to change this aggregation behavior? For certain fields, I would like to see the average instead of the sum. 
Is there a way?


Axel Mendoza
On 3/26/16, 3:59 PM

Hi Gregor Heger

You need to define the field group_operator that by default is sum even if you don't specify it. That it's defined directly in the field, like:

count = fields.Integer('Count', group_operator='avg')

It works! Thank you very much!

Gregor Heger
on 3/27/16, 7:17 PM

Happy to help

Axel Mendoza
on 3/28/16, 3:29 AM

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/26/16, 11:10 AM
Seen: 881 times
Last updated: 3/28/16, 2:27 AM