Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
i wanted to know how to filter by reord for the current week from monday that means if today is monday i want all the record from today to next monday if we are sunday i want all the record from last monday to next monday no matter which day we are i want from this week monday to the next
thanks a lot
You can create a filter like this,
<filter string="Current Week" name="Current Week" domain="[('date','<',(context_today()+relativedelta(days=7)).strftime('%Y-%m-%d 23:59:59')), ('date','>=',context_today().strftime('%Y-%m-%d 00:00:00'))]"/>
This will give you the filter you require for the current week. For eg, if today is Monday then records till next Monday.
Hope this helps,
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
|Asked: 12/8/16, 3:32 AM|
|Seen: 1279 times|
|Last updated: 12/8/16, 7:24 AM|