Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
5206 Vizualizări

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.

Imagine profil
Abandonează
Cel mai bun răspuns

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')))]"/>
Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
0
iun. 15
4160
1
feb. 25
1412
2
mai 25
1654
1
iul. 25
313
3
dec. 24
5295