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

Hi guyz,

I need to know how to create a filter in which the invoices for this month(06/June) to be displayed.

For example :

I have 3 records with  datetime field :
rec1                        -           12/06/2013  13:54:39                            
rec2                        -           20/06/2013  12:12:58
rec3                        -           05/05/2013  05:30:25

So when the filter is created using todays date: 'date1': fields.date.context_today,

I need to show only rec1 and rec2 as the current month is 06.

If we need the invoice for todays date, we can use this query :

[['date_invoice','=',time.strftime('%Y-%m-%d')]]
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 9 16
56
1
thg 2 23
5948
1
thg 7 22
3321
9
thg 12 23
38697
1
thg 1 20
10853