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

Hi, im using odoo 17,  i create a field in odoo studio called  x_studio_fecha_finalizacin.

Im trying to compare the field with today date like this:
 <t t-if="job.x_studio_fecha_finalizacin &gt; today()"> 
             <p>Finalizado</p>                                                
 </t>

This is the error:

Error while render the template
TypeError: 'NoneType' object is not callable
Template: website_hr_recruitment.index
Path: /t/t/div/div[2]/div/div[2]/div/div/div/a/div/div[3]/div[2]/t[1]
Node: <t t-if="job.x_studio_fecha_finalizacin &gt; today()"/>



  
I see de today() method in the qweb documentation

Any idea?

아바타
취소
베스트 답변

Hello, 


try :


<t t-if="job.x_studio_fecha_finalizacin and job.x_studio_fecha_finalizacin &gt; datetime.date.today()">

    <p>Finalizado</p>                                               

</t>


Best regards

아바타
취소
관련 게시물 답글 화면 활동
6
1월 24
12364
1
4월 25
662
2
3월 25
775
4
11월 24
6463
1
3월 24
1460