Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
1975 Vizualizări

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.

Imagine profil
Abandonează
Cel mai bun răspuns

Hi Ibrahim Boudmir

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

Imagine profil
Abandonează
Autor

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

Cel mai bun răspuns

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.

Imagine profil
Abandonează
Autor

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.