Odoo Help

0

0
1 Risposta
0
Theis Dræberg Danimarca
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')))]"/>
Fai una domanda
Keep Informed
1 follower(s)
About This Community

This platform 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.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now