Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
4335 Widoki

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?

Awatar
Odrzuć
Najlepsza odpowiedź

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')
Awatar
Odrzuć
Autor

I used group_operator in field ,Still no change. Thanks

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

Powiązane posty Odpowiedzi Widoki Czynność
2
gru 22
14768
1
lis 21
4891
0
sty 21
2260
8
maj 20
7772
0
gru 23
2910