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

Hi, first of all, thank you for reading this post. I am new to Odoo and python, so I appreciate that you are taking time to help.


I want to show a specific value in my kanban view, depending if the datetime in the database correspond to todays's date.


I have a datetime variable in my model.

datetime_contact = fields.Datetime(string="Date of contact")


In the Kanban view I want to show the 'time_contact_char' if the day of datetime_contact is equal to today's date.  if not, I want to show the 'date_contact_char' field.


This is the code from the kanban view. 


What should I put in the condition to check if current datetime_contact field is from today? 

  

t-if="record.datetime_contact.value == ???"


*what I want to accomplish is what gmail use for showing the time of the email in the inbox. If the email was received today it shows the time. If the email was received another day, it shows the date. For example "8:53 AM" if the email is from today  "Jun 14" if the email is from Yesterday

아바타
취소
관련 게시물 답글 화면 활동
1
8월 17
22720
0
9월 23
5307
0
2월 21
2779
0
8월 16
4336
2
6월 16
10402