Skip to content
Snippets Groups Projects
Commit 03e8089a authored by Benjamin - Le Filament's avatar Benjamin - Le Filament
Browse files

[cgscop #167] ajout filtres : ce mois-ci, mois précédent

parent 30cb2939
No related branches found
No related tags found
No related merge requests found
......@@ -202,6 +202,11 @@
<filter string="UR" name="ur" domain="[('type', '=', 'ur')]"/>
<filter string="Hors UR" name="not_ur" domain="[('type', '=', 'outside')]"/>
<filter string="Absent" name="absent" domain="[('type', '=', 'absent')]"/>
<separator/>
<filter string="Ce mois-ci" name="this_month" domain="[('start','&lt;=', (context_today()-relativedelta(day=31, months=0)).strftime('%Y-%m-%d')),
('start','&gt;=',(context_today()-relativedelta(day=1,months=0)).strftime('%Y-%m-%d'))]"/>
<filter string="Le mois pécédent" name="last_month" domain="[('start','&lt;=', (context_today()-relativedelta(day=31, months=1)).strftime('%Y-%m-%d')),
('start','&gt;=',(context_today()-relativedelta(day=1,months=1)).strftime('%Y-%m-%d'))]"/>
</filter>
</field>
</record>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment