Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
1540 Lượt xem

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


Can you please advise.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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'))]"/>      
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 3 25
6080
0
thg 12 24
1190
2
thg 1 24
1867
4
thg 4 25
12101
0
thg 2 25
1603