Skip to content

Instantly share code, notes, and snippets.

@akhdaniel
Last active December 3, 2019 09:26
Show Gist options
  • Save akhdaniel/020b8169b1a1fa824185ceb26e421bb1 to your computer and use it in GitHub Desktop.
Save akhdaniel/020b8169b1a1fa824185ceb26e421bb1 to your computer and use it in GitHub Desktop.
Odoo Filter Today
<filter string="Today" name="today" domain="[('date_start','&gt;=',time.strftime('%%Y-%%m-%%d'))]"/>
<filter string="This Month" name="thismonth" domain="[('date_start','&gt;=',time.strftime('%%Y-%%m-01'))]"/>
<filter string="This Year" name="thisyear" domain="[('date_start','&gt;=',time.strftime('%%Y-01-01'))]"/>
<filter string="Today" domain="[('start_at', '>=', datetime.datetime.combine(context_today(), datetime.time(0,0,0)))]" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment