콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
4406 화면

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?

아바타
취소
베스트 답변

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')
아바타
취소
작성자

I used group_operator in field ,Still no change. Thanks

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

관련 게시물 답글 화면 활동
2
12월 22
14870
1
11월 21
4982
0
1월 21
2337
8
5월 20
7898
0
12월 23
2967