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

Problem base report creator, "group by"

v5
By
Eduard Quintana
on 2/21/13, 11:28 AM 1,159 views

I'm using ERP v.5, and I'm trying to use the module base_report_creator.

When I add a field as "COUNT" or "SUM", for example, it still appears in the "group by" part of the sql request. And thus, the request doesn't works.

I searched for information, but I only found other people asking more or less the same, but without a clear answer.

Any help? Thank you

select st.target_value, cl.user_id,he.name_related, count(cl.user_id) as achieved, round(((cast(count(cl.user_id) as decimal(2))/st.target_value)*100)) as val from
salesman_target st, hr_employee he, res_users ru, resource_resource rr, crm_lead cl where ru.id=rr.user_id and rr.id=he.resource_id and st.employee_id=he.id and cl.user_id=ru.id and cl.type='opportunity' and cl.state='draft' and cl.section_id='1' and date_open>='%s' and date_open<=now() + interval '30 days' group by st.target_value, cl.user_id,he.name_related try like that it's really working

gpkarthick
on 5/16/13, 9:23 AM

Thank you gpkarthick,

but I still have the same problem. The module "base report creator" doesn't let edit the SQL text. I just can pick the field of some table, and it's the module who builds the SQL. I don't know how to use that to make a really simple query, like, for example, counting hoy many customers are in each city.

Regards

Eduard Quintana
on 5/20/13, 2:29 PM

you want that query for creating report i already created a report with query city based salesman target with group by you just give me your mailid i will send you just refer it, it may help you

gpkarthick
on 5/21/13, 2:58 AM

actually what you are doing explain clearly

gpkarthick
on 5/21/13, 3:14 AM
0
gpkarthick
On 5/21/13, 3:01 AM

you want that query for creating report i already created a report with query city based salesman or customer target with group by you just give me your mail Id, i will send you just refer it, it may help you

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: 2/21/13, 11:28 AM
Seen: 1159 times
Last updated: 3/16/15, 8:10 AM