跳至内容
菜单
此问题已终结
1 回复
1441 查看

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
5977
0
12月 24
1101
2
1月 24
1771
4
4月 25
11941
0
2月 25
1493