Skip to Content
Odoo Menu
  • Zaloguj się
  • Wypróbuj za darmo
  • Aplikacje
    Finanse
    • Księgowość
    • Fakturowanie
    • Wydatki
    • Arkusz kalkulacyjny (BI)
    • Dokumenty
    • Podpisy
    Sprzedaż
    • CRM
    • Sprzedaż
    • PoS Sklep
    • PoS Restauracja
    • Subskrypcje
    • Wypożyczalnia
    Strony Internetowe
    • Kreator Stron Internetowych
    • eCommerce
    • Blog
    • Forum
    • Czat na Żywo
    • eLearning
    Łańcuch dostaw
    • Magazyn
    • Produkcja
    • PLM
    • Zakupy
    • Konserwacja
    • Jakość
    Zasoby Ludzkie
    • Pracownicy
    • Rekrutacja
    • Urlopy
    • Ocena pracy
    • Polecenia Pracownicze
    • Flota
    Marketing
    • Marketing Społecznościowy
    • E-mail Marketing
    • SMS Marketing
    • Wydarzenia
    • Automatyzacja Marketingu
    • Ankiety
    Usługi
    • Projekt
    • Ewidencja czasu pracy
    • Usługi Terenowe
    • Helpdesk
    • Planowanie
    • Spotkania
    Produktywność
    • Dyskusje
    • Zatwierdzenia
    • IoT
    • VoIP
    • Baza wiedzy
    • WhatsApp
    Aplikacje trzecich stron Studio Odoo Odoo Cloud Platform
  • Branże
    Sprzedaż detaliczna
    • Księgarnia
    • Sklep odzieżowy
    • Sklep meblowy
    • Sklep spożywczy
    • Sklep z narzędziami
    • Sklep z zabawkami
    Żywienie i hotelarstwo
    • Bar i Pub
    • Restauracja
    • Fast Food
    • Pensjonat
    • Dystrybutor napojów
    • Hotel
    Agencja nieruchomości
    • Agencja nieruchomości
    • Biuro architektoniczne
    • Budowa
    • Zarządzanie nieruchomościami
    • Ogrodnictwo
    • Stowarzyszenie właścicieli nieruchomości
    Doradztwo
    • Biuro księgowe
    • Partner Odoo
    • Agencja marketingowa
    • Kancelaria prawna
    • Agencja rekrutacyjna
    • Audyt i certyfikacja
    Produkcja
    • Tekstylia
    • Metal
    • Meble
    • Jedzenie
    • Browar
    • Prezenty firmowe
    Zdrowie & Fitness
    • Klub sportowy
    • Salon optyczny
    • Centrum fitness
    • Praktycy Wellness
    • Apteka
    • Salon fryzjerski
    Transakcje
    • Złota rączka
    • Wsparcie Sprzętu IT
    • Systemy energii słonecznej
    • Szewc
    • Firma sprzątająca
    • Usługi HVAC
    Inne
    • Organizacja non-profit
    • Agencja Środowiskowa
    • Wynajem billboardów
    • Fotografia
    • Leasing rowerów
    • Sprzedawca oprogramowania
    Przeglądaj wszystkie branże
  • Community
    Ucz się
    • Samouczki
    • Dokumentacja
    • Certyfikacje
    • Szkolenie
    • Blog
    • Podcast
    Pomóż w nauce innym
    • Program Edukacyjny
    • Scale Up! Gra biznesowa
    • Odwiedź Odoo
    Skorzystaj z oprogramowania
    • Pobierz
    • Porównaj edycje
    • Wydania
    Współpracuj
    • Github
    • Forum
    • Wydarzenia
    • Tłumaczenia
    • Zostań partnerem
    • Usługi dla partnerów
    • Zarejestruj swoją firmę rachunkową
    Skorzystaj z usług
    • Znajdź partnera
    • Znajdź księgowego
    • Spotkaj się z doradcą
    • Usługi wdrożenia
    • Opinie klientów
    • Wsparcie
    • Aktualizacje
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Zaplanuj demo
  • Cennik
  • Pomoc

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Księgowość
  • Zapasy
  • PoS
  • Projekt
  • MRP
All apps
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Pomoc

User timezone not used

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
timezonedatetimev14
3 Odpowiedzi
6851 Widoki
Awatar
Alberto

To recreate I have a single Datetime field and a simple form view for it.


I've changed all of my Odoo users timezone to Japan (UTC+9) for test (settings/users/manage users), even the users marked as inactive. However when a user logs in and goes to that form and edits datetime field the field takes system OS timezone (UTC+2) in question and ignores user timezone in settings.

I've tested this - if user enters for example 2021-06-13 13:12:46 it is saved in database as 2021-06-13 11:12:46 which is correct for timezone UTC+2 , however since user has Japan set as their timezone in the settings I expected that to be saved as 2021-06-13 04:12:46 in the database.


Is this expected behaviour? Is it ALWAYS going to be like this (is there any case where it will take user timezone into the account?). For what is the user timezone even used?


Also can I somehow take this information from the env? Same as I get user timezone:

self.env.user.tz

but for system timezone? Or do I have to get it myself with Python? Edit: Actually I can't do it with Python for users, I can only get server system timezone not the user system timezone. How do I deal with this?


I''m  using Odoo 14 and Ubuntu 20


Edit: I can't comment on your answers because I lack 8 karma, whoever thought of this is...

anyway for my question I think I have to rely on users setting their timezone in settings to match their system timezone? Aka I hope they don't screw around(since they can easily select wrong one)?

0
Awatar
Odrzuć
Awatar
Ravi Gadhia
Najlepsza odpowiedź

yes, it's the standard behavior of odoo.
Odoo takes browser timezone (eventually system timezone) regardless of the timezone of the user currently lognin.

for testing purpose, if you want to change the timezone of the browser timezone there are versions browser plugin available in the market but my favorite is open chrome with specific timezone with command line 

TZ='UTC' open -na "Google Chrome" --args "--user-data-dir=$HOME/chrome-profile"

Note: Timezone set on the user is used in a various module like event, employee_leave, resource, calendar_appointment to determine user availability 

1
Awatar
Odrzuć
joaquin.aparicio@rulesware.com

I have the same problem. How I can get the browser timezone in odoo environment?? So, if I am able to get the browser timezone, I'll can detect the mismatch between odoo user timezone and browser timezone and maybe set the same or consider the differences between them before save in UTC. I see the odoo detect this mismatch when set the user timezone preference and shows a warning message but it is a widget and I was not able to know how to do it. Any advice???

Awatar
Divyansh Tripathi
Najlepsza odpowiedź

Instead of you changing it for every user, the user themselves can set it and it should work. Just log in as a user and press the logged-in username on the top right corner, select preferences, and there set the time-zone and then see if it gets you desired results.

0
Awatar
Odrzuć
Awatar
Alberto
Autor Najlepsza odpowiedź

@Divyansh Tripathi (can't comment because of stupid forum karma system so I have to answer instead) I told you that it doesn't work, no matter if users change it themselves or if I change it for them.

This is development server and it always takes my system timezone which is UTC+2 instead of logged in user timezone defined in settings (no matter which user I log in as).

Edit: Are you saying I have to expect from users to set their timezone in setting to match their system timezone correctly? In that case it would work but I would have to enforce it (tell them) and hope they don't mess around and select wrong timezone.

0
Awatar
Odrzuć
Podoba Ci się ta dyskusja? Dołącz do niej!

Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!

Zarejestruj się
Powiązane posty Odpowiedzi Widoki Czynność
Timezone problem to convert datetime to string
timezone datetime v14
Awatar
0
paź 21
4602
Take Users Timezone Rozwiązane
timezone datetime
Awatar
Awatar
Awatar
Awatar
3
lip 25
5255
Changing the time/date setting in V14 system Rozwiązane
datetime v14
Awatar
Awatar
1
lut 21
11012
Time & Date Issue Rozwiązane
timezone datetime
Awatar
Awatar
Awatar
6
wrz 19
12496
How to add time difference on datetime object in Email Template ?
timezone datetime
Awatar
Awatar
Awatar
2
mar 16
8665
Społeczność
  • Samouczki
  • Dokumentacja
  • Forum
Open Source
  • Pobierz
  • Github
  • Runbot
  • Tłumaczenia
Usługi
  • Hosting Odoo.sh
  • Wsparcie
  • Aktualizacja
  • Indywidualne rozwiązania
  • Edukacja
  • Znajdź księgowego
  • Znajdź partnera
  • Zostań partnerem
O nas
  • Nasza firma
  • Zasoby marki
  • Skontaktuj się z nami
  • Oferty pracy
  • Wydarzenia
  • Podcast
  • Blog
  • Klienci
  • Informacje prawne • Prywatność
  • Bezpieczeństwo Odoo
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo to pakiet aplikacji biznesowych typu open source, które zaspokoją wszystkie potrzeby Twojej firmy: CRM, eCommerce, księgowość, inwentaryzacja, punkt sprzedaży, zarządzanie projektami itp.

Unikalną wartością Odoo jest to, że jest jednocześnie bardzo łatwe w użyciu i w pełni zintegrowane.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now