跳至內容
選單
此問題已被標幟
1 回覆
1457 瀏覽次數

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
12690
1
4月 25
1211
2
3月 25
1351
4
11月 24
7073
1
3月 24
1992