Skip to Content
मेन्यू
This question has been flagged
1 Reply
4357 Views

In odoo 8, how to calculate average for a field in tree view?

I tried,

    <field name = "average_rating" avg="Average"/>

but no change. How to use it?

Avatar
Discard
Best Answer

try "sum" instead "avg"

or 

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')
Avatar
Discard
Author

I used group_operator in field ,Still no change. Thanks

group_operator work only when you group by on any field in list view.

Related Posts Replies Views Activity
2
दिस॰ 22
14787
1
नव॰ 21
4909
0
जन॰ 21
2274
8
मई 20
7785
0
दिस॰ 23
2925