Skip to Content
Menu
This question has been flagged
1 Atsakyti
1582 Rodiniai

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


Can you please advise.

Portretas
Atmesti
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'))]"/>      
Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
2
kov. 25
6141
0
gruod. 24
1226
2
saus. 24
1906
4
bal. 25
12167
0
vas. 25
1651