Odoo Help

Welcome!

This community 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.

0

[V8] How to calculate average value of a field in a day (not price/cost field)?

By
FEDERICO LEONI
on 5/27/15, 6:44 PM 434 views

In our orders we have a char field where we put a value from 1 to 10. At the end of the day I need to export those values on calc (or excel) and make a classic average (sum of the field values / number_of orders).

Now I would like to have it done automatically for every order we made in a working day. Any idea? What about scheduled action (how)?

Edit:

Even with a new float field the avg do not shows.

 

1
Kinner Vachhani
On 5/28/15, 9:54 AM

Hi Federico,

You can add this field on orders list view and use aggregated method avg e.g avg="Avg. Delay To Pay". 

At the end of day do a group by on date field and this value would be automatically calculated at end of list view.

Kinner could you elaborate a little more your reply?
I've added the value on my tree view

 field name="x_value" avg="Average value" groups="point_of_sale.group_pos_manager" 
but nothing is showed at the end of the list (like the sum of orders values).
FEDERICO LEONI
on 5/28/15, 2:53 PM

Hi Fedorico, Try group in list view and see if avg appears?

Kinner Vachhani
on 5/28/15, 4:38 PM

Sorry for the delay. Busy days... Even when I group by date (greater or equal of today) the avg don't shows up like the sum at the end of orders list.

FEDERICO LEONI
on 5/29/15, 3:31 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 5/27/15, 6:44 PM
Seen: 434 times
Last updated: 5/29/15, 3:43 PM