# Odoo Help

1 Risposta
Theis Dræberg
15/09/18, 04:42

We solved it this way:

`<filter string="5-6 months" domain="[('date_order', '&gt;=', ((context_today()+relativedelta(months=-6, days=1, weekday=0)).strftime('%Y-%m-%d'))),('date_order', '&lt;=', ((context_today()+relativedelta(months=-5,weekday=6)).strftime('%Y-%m-%d')))]"/>                    <filter string="7-11 months" domain="[('date_order', '&gt;=', ((context_today()+relativedelta(months=-11, weeks=-1, days=1, weekday=0)).strftime('%Y-%m-%d'))),('date_order', '&lt;=', ((context_today()+relativedelta(months=-7,weekday=6)).strftime('%Y-%m-%d')))]"/>                    <filter string="11-12 months" domain="[('date_order', '&gt;=', ((context_today()+relativedelta(years=-1, weeks=-1, days=1, weekday=0)).strftime('%Y-%m-%d'))),('date_order', '&lt;=', ((context_today()+relativedelta(months=-11,weekday=6)).strftime('%Y-%m-%d')))]"/>                    <filter string="12 months+" domain="[('date_order', '&gt;=', ((context_today()+relativedelta(years=-30, days=1, weekday=0)).strftime('%Y-%m-%d'))),('date_order', '&lt;=', ((context_today()+relativedelta(years=-1, weeks=-1, weekday=6)).strftime('%Y-%m-%d')))]"/>`
1 follower(s)