跳至內容
選單
此問題已被標幟
10510 瀏覽次數

How do i take current date in different timezone in xml in odoo?

I need to use it in xml to filter record in search view based on date?

By Default i am getting date in UTC (+0000)


Example: in hr_attendance module


There is default filter "Today" when you click on "Attendances" but it it taking time  in  UTC (+0000)

So i am getting some wrong records due to different timezone

Hers is xml code for that which is written in "hr_attendance_view.xml"

     <filter string="Today" name="today" domain="[('name','&gt;=',current_date),('name','&lt;=',current_date)]" />

So here How can i give "current_date" in different timezone 

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
1月 25
1627
1
3月 25
652
1
9月 23
2906
2
8月 22
7981
8
6月 20
22299