The Question has been closedby
How can I create a filter for "This week" or a set of 7 days, starting with the current date? I want to add this filter under project.task.
I have tried to filter on date_start like this:
But whenever I try to filter it sais: "Uncaught TypeError: Cannot read property 'length' of undefined".
What do I need to correct/change in my filter; or is there a better way to do this?
[('date_start','>=', ((context_today()).strftime('%Y-%m-%d'))), ('date_start','<=', ((context_today()+datetime.timedelta(days=7)).strftime('%Y-%m-%d')))]
The above will look for everything that is between today and 7 days from now. It also filters everything about before today. Switch "date_start" to another field to use this filter in another model.
About This Community
|Asked: 6/11/13, 6:52 AM|
|Seen: 6911 times|
|Last updated: 3/16/15, 8:10 AM|