sql="""select he.name_related,
he.lead_target,
count(cl.user_id) as achieved,
round(((cast(count(cl.user_id) as decimal(2))/he.lead_target)*100)) as val
from crm_lead cl,
hr_employee he,
res_users rs,
resource_resource rr
where cl.type='opportunity' and rr.id=he.resource_id and
rs.id=rr.user_id and rs.id=cl.user_id and date_open>='%s' and date_open<=date_open + interval '7 days'
group by he.name_related, he.lead_target
""" %(form['start_date'])------------------>i am passing only start date i need to get the interval date as a end date, above query is working fine <blocktable colwidths="530.00" style="table1">
<para style="terp_tblheader_Details">Date from: [[ data['form']['start_date'] ]] to [[here how to get the end date from the start of perticular interval]]</para>
</blocktable>
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
1
Reply
3049
Views
i used function and calculate the end date and pass to the report
Looking for the same, please elaborate more.