I need a filter that will filter production orders only with date_planned_start in the current week.
Can you please advise.
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'))]"/>
domain="[('date_planned_start','>=',(context_today() relativedelta(days=context_today().weekday())).strftime('%Y-%m-%d')),('date_planned_start','<', (context_today()+relativedelta(days=7-context_today().weekday())).strftime('%Y-%m-%d'))]"
Özel özelliklerden yararlanmak ve harika topluluğumuzla etkileşime geçmek için bugün bir hesap oluşturun!
Üye Ol| İlgili Gönderiler | Cevaplar | Görünümler | Aktivite | |
|---|---|---|---|---|
|
|
2
Mar 25
|
7781 | ||
|
0
Ara 24
|
2873 | |||
|
2
Oca 24
|
3254 | |||
|
Dynamic date in filters
Çözüldü
|
4
Nis 25
|
14659 | ||
|
0
Nis 26
|
3559 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.