Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
4328 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Autore

I used group_operator in field ,Still no change. Thanks

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

Post correlati Risposte Visualizzazioni Attività
2
dic 22
14761
1
nov 21
4872
0
gen 21
2246
8
mag 20
7756
0
dic 23
2904