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 would like to know how to automatically display records in a list due based on the due date date being the current day.
for example I would like to be able to be shown only delivery orders (grouped by status) on the current day when accessing the delivery order list view.
how can i set a default filter to do this?
You should have a date field which stores the date. On the action, you should write the domain,
Use a domain like this :
domain = [('date', '=', context_today())]
domain = [('date','=',datetime.strftime('%%Y-%%m-%%d') )]"
domain = [('date','=',time.strftime('%%Y-%%m-%%d'))]
You may create a default filter in search view:
<filter icon="terp-go-today" string="Today" domain="[('date','<=',time.strftime('%%Y-%%m-%%d 23:59:59')),('date','>=',time.strftime('%%Y-%%m-%%d 00:00:00'))]" help="Today"/>
This should help.
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: 7/7/14, 5:02 PM|
|Seen: 871 times|
|Last updated: 3/16/15, 8:10 AM|