Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4572 Lượt xem

I have a Datetime field in Sale order, when i print sale report it shows me that field in UTC time, how can i convert it to users timezone?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello Darth Vader,

You can get the date and time according to the user's timezone by using context_timestamp on report field.

Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

Ảnh đại diện
Huỷ bỏ

For Example:

<p class="m-0" t-esc="context_timestamp(doc.confirmation_date).strftime('%m/%d/%Y, %H:%M:%S')"/>

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 10 16
8880
Take Users Timezone Đã xử lý
3
thg 7 25
3884
3
thg 7 25
3198
1
thg 1 24
1454
Time & Date Issue Đã xử lý
6
thg 9 19
11177