Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
1459 Prikazi

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


Can you please advise.

Avatar
Opusti
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
Opusti
Related Posts Odgovori Prikazi Aktivnost
2
mar. 25
6031
0
dec. 24
1140
2
jan. 24
1785
4
apr. 25
11972
0
feb. 25
1524