コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
1978 ビュー

Hi, 


In stock.picking, we have the  field "scheduled_date" that is computed based on date in move lines.

as you know, In DB it's always UTC  and then Odoo tries to convert the date based on user's Timezone.


SO if in db it's 2022-02-02 14:00:00 and the user has europe/Paris timezone, the user will see
2022-02-02 16:00:00 in scheduled date.

i tried to search in Odoo where it converts the time based on timezone in order to disable it for this specific field and couldn't find it.

Question: Can someone help and tell me where/how can i disable time convertion for this specific field ? 


Thank you.

アバター
破棄
最善の回答

Hi Ibrahim Boudmir

You can find timezone field in user profile, but the time ( scheduled_date ) will appear depending on browser timezone.

アバター
破棄
著作者

timezone field in user profile must remain the same.
I only want to have UTC timezone for field "scheduled_date"

最善の回答

Try to find what is current user's timezone and then convert that time to the system user profile timezone after that odoo will automatically store that time in the UTC time zone in DB.

So from the current user's screen, he will see time based on the system user profile timezone.

アバター
破棄
著作者

if i understand well,
1- get odoo user profile timezone
2- convert it to UTC
right ?

If yes, I already did it and still get sheduled_date in odoo user profile timezone and not utc.