Odoo Help

0

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

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

Hi,

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?

 

2
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.

Register

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)

Stats

Asked: 3/26/16, 11:10 AM
Seen: 790 times
Last updated: 3/28/16, 2:27 AM