コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
1538 ビュー

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


Can you please advise.

アバター
破棄
最善の回答

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'))]"/>      
アバター
破棄
関連投稿 返信 ビュー 活動
2
3月 25
6077
0
12月 24
1189
2
1月 24
1863
4
4月 25
12098
0
2月 25
1597