Odoo Help


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.


group by day of month

kobi segev
on 10/2/13, 5:54 AM 1,491 views

On v7, group by date (anywhere), groups results by month and not the day. I understand that there is a workaround to add date to char column and group by that field.

The thing is that i defensively don't want to go through 9-10 modules i have inline and fix them.

is there any other solution?

The problem is your date will be of string type. Please check its type. You have to convert it into datetime and then check. You will get the result

Abhishek H Menon
on 10/3/13, 10:41 AM
Daryl van Sittert
On 2/5/15, 4:03 AM

This is a confirmed bug and you will have execute a sql command manually.

cr.execute('SELECT call_date, COUNT(*) AS num_calls FROM bitco_voice_daily_summary GROUP BY call_date;')
results = cr.fetchall()
for result in results:
    p 'There were ' + str(result[1]) + ' calls made on '+ str(result[0])

Be careful of sql injection if you're building a query with parameters.

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

0 follower(s)


Asked: 10/2/13, 5:54 AM
Seen: 1491 times
Last updated: 3/16/15, 8:10 AM