콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다

How do i search a date field in my odoo search by the year in that specific date field.

It should be able to search the date field by only comparing the year part in the date field.

Eg:- I have dates like '01/04/2015','04/07/2016','10/10/2015' . I want to fetch the date field by giving just 2016 and it should retrieve me the last two document alone. 

I tried following options but didn't work.

<field name="date" filter_domain="[('date.strftime('%%Y')','=',self)]"/>

<field name="date" filter_domain="[('date.strftime('%%Y')','=',time.strftime('%%Y'))]"/>

아바타
취소
작성자

My Dates will be as follows 01/04/2015','04/07/2016','10/10/2016' and need to fetch last two records.

관련 게시물 답글 화면 활동
1
5월 18
8818
1
7월 23
1998
1
2월 22
1539
2
4월 21
15713
5
10월 16
12628