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

dashboard report based on moving date

By
Jeff Moseler
on 4/4/13, 2:02 PM 1,305 views

I would like to put a report on my dashboard of all the employee contracts that are ending in the next 60 days. How can I enter a formula or a trigger or something to update the report each day?

I wrote an SQL for it in pgAdmin, but I'm unsure how to get OpenERP to run the query and add it to the dashboard.

1

Yannick Vaucher

--Yannick Vaucher--
1699
| 5 7 9
Lausanne, Switzerland
--Yannick Vaucher--
Yannick Vaucher
On 4/30/13, 10:24 AM

You should refer to CRM dashboard in crm module to know how to create your reporting data using a SQL request in a custom module.

Then you will be able to add a domain like this in your XML file:

domain="[('<date_field>','&lt;=', ((context_today()+datetime.timedelta(days=60)).strftime('%%Y-%%m-%%d')))]"

Or you can create a filter like this in your list view to try to create the one you will add to your dashboard.

<filter
  string="Contracts ending in next 60 days"
  domain="[('<date_field>','&lt;=', ((context_today()+datetime.timedelta(days=60)).strftime('%%Y-%%m-%%d')))]"/>

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: 4/4/13, 2:02 PM
Seen: 1305 times
Last updated: 3/16/15, 8:10 AM