Skip to Content
मेन्यू
This question has been flagged
1 Reply
1421 Views

I need a filter that will filter production orders only with date_planned_start in the current week.


Can you please advise.

Avatar
Discard
Best Answer

please try to use this filter command in your search view

<filter string="This Week" name="date_planned_start" domain="[                ('date_planned_start', '>=', (datetime.datetime.combine(context_today() + relativedelta(weeks=-1,days=1,weekday=0), datetime.time(0,0,0)).to_utc()).strftime('%Y-%m-%d %H:%M:%S')),                ('date_planned_start', '<', (datetime.datetime.combine(context_today() + relativedelta(days=1,weekday=0), datetime.time(0,0,0)).to_utc()).strftime('%Y-%m-%d %H:%M:%S'))]"/>      
Avatar
Discard
Related Posts Replies Views Activity
2
मार्च 25
5953
0
दिस॰ 24
1064
2
जन॰ 24
1757
4
अप्रैल 25
11877
0
फ़र॰ 25
1446