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

Datetime picker in website Odoo 12

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
datetimeodooV12
1 Odpowiedz
9628 Widoki
Awatar
David Kovač

I am trying to create a datetime picker in a form using o_website_form_datetime, but the problem is that, the input field doesn't show the popup to enter the date and time.

 This is the code for my input:

<input id="date_time_funeral" type="text" name="date_time_funeral" class="form-control o_website_form_datetime" t-att-value="date_time_funeral" data-date-format="DD.MM.YYYY HH:MM" style="text-align: center;" autocomplete="off" required="true"/>


I took the code from an odoo 10 project, and there it works with no problem.

I am avoiding to use type="datetime-local", since it is not supported by all browsers.

1
Awatar
Odrzuć
Awatar
David Kovač
Autor Najlepsza odpowiedź

I've found out, there is a js and css file for the datetime picker both with the name tempusdominus, and i made some reasearch about it on the web, and i did a test.html file, in witch everything works fine, but in my odoo project it does not show the popup for the datetime picker. When the field is focus, it only inserts the current date and time without the popup, but if i manuly add jquery, bootrap and font-awsome it shows the popup and everything, but i get lots of errors in the console.


Here is what i add with xpath:

    <template inherit_id="website.assets_frontend" name="Website Form Assets Frontend" id="assets_frontend">
<xpath position="inside" expr=".">


            <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" />
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"/>


<script type="text/javascript" src="/test_datetime/static/src/tempusdominus/moment-with-locales.min.js"/>
<script type="text/javascript" src="/test_datetime/static/src/tempusdominus/tempusdominus.js"/>
<link type="text/css" href="/test_datetime/static/src/tempusdominus/tempusdominus.css" rel="stylesheet"/>
</xpath>
</template>

this is now my input field:

<input id="date_time_funeral" type="text" name="date_time_funeral" class="form-control datetimepicker-input" data-toggle="datetimepicker" data-target="#date_time_funeral" style="text-align: center;" autocomplete="off"/>

<script type="text/javascript">
$(function () {
$('#date_time_funeral').datetimepicker();
});
</script>

here are the console errors:

Uncaught TypeError: Cannot read property '_options' of undefined

    at HTMLInputElement.<anonymous> (web.assets_common.js:3107)

    at HTMLDocument.dispatch (web.assets_common.js:892)

    at HTMLDocument.elemData.handle (web.assets_common.js:865)

    at Object.trigger (web.assets_common.js:886)

    at Object.simulate (web.assets_common.js:907)

    at HTMLDocument.handler (web.assets_common.js:924)

(anonymous) @ web.assets_common.js:3107

dispatch @ web.assets_common.js:892

elemData.handle @ web.assets_common.js:865

trigger @ web.assets_common.js:886

simulate @ web.assets_common.js:907

handler @ web.assets_common.js:924

web.assets_common.js:3456 error: Some modules could not be started

log @ web.assets_common.js:3456

(anonymous) @ web.assets_common.js:3469

e @ jquery.min.js:2

t @ jquery.min.js:2

setTimeout (async)

(anonymous) @ jquery.min.js:2

c @ jquery.min.js:2

add @ jquery.min.js:2

(anonymous) @ jquery.min.js:2

Deferred @ jquery.min.js:2

then @ jquery.min.js:2

(anonymous) @ web.assets_common.js:3469

(anonymous) @ web.assets_common.js:44

setTimeout (async)

_.delay @ web.assets_common.js:44

log_when_loaded @ web.assets_common.js:3469

fire @ web.assets_common.js:796

fireWith @ web.assets_common.js:801

ready @ web.assets_common.js:809

completed @ web.assets_common.js:810

web.assets_common.js:3457 Failed modules:           (3) ["payment.processing", "website.content.compatibility", "web_editor.widget"]

log @ web.assets_common.js:3457

(anonymous) @ web.assets_common.js:3469

e @ jquery.min.js:2

t @ jquery.min.js:2

setTimeout (async)

(anonymous) @ jquery.min.js:2

c @ jquery.min.js:2

add @ jquery.min.js:2

(anonymous) @ jquery.min.js:2

Deferred @ jquery.min.js:2

then @ jquery.min.js:2

(anonymous) @ web.assets_common.js:3469

(anonymous) @ web.assets_common.js:44

setTimeout (async)

_.delay @ web.assets_common.js:44

log_when_loaded @ web.assets_common.js:3469

fire @ web.assets_common.js:796

fireWith @ web.assets_common.js:801

ready @ web.assets_common.js:809

completed @ web.assets_common.js:810

web.assets_common.js:3458 Rejected modules:         (6) ["portal.portal", "sale_management.sale_management", "website_rating_project.rating", "account.AccountPortalSidebar.instance", "sale.SalePortalSidebar.instance", "root.widget"]

log @ web.assets_common.js:3458

(anonymous) @ web.assets_common.js:3469

e @ jquery.min.js:2

t @ jquery.min.js:2

setTimeout (async)

(anonymous) @ jquery.min.js:2

c @ jquery.min.js:2

add @ jquery.min.js:2

(anonymous) @ jquery.min.js:2

Deferred @ jquery.min.js:2

then @ jquery.min.js:2

(anonymous) @ web.assets_common.js:3469

(anonymous) @ web.assets_common.js:44

setTimeout (async)

_.delay @ web.assets_common.js:44

log_when_loaded @ web.assets_common.js:3469

fire @ web.assets_common.js:796

fireWith @ web.assets_common.js:801

ready @ web.assets_common.js:809

completed @ web.assets_common.js:810

web.assets_common.js:3459 Rejected linked modules:  (24) ["web_tour.tour", "website.tour_reset_password", "website_sale.tour_shop", "website_sale.tour_shop_cart_recovery", "website_sale.tour_shop_mail", "website_crm.tour", "portal.tour", "website.test.html_editor", "website_sale.tour", "website_sale.tour_shop_customize", "website_sale.tour_shop_custom_attribute_value", "website_sale.tour_shop_zoom", "website_sale.tour_shop_dynamic_variants", "website_sale.tour_shop_deleted_archived_variants", "website_sale.tour_shop_list_view_b2c", "website_sale.tour_shop_no_variant_attribute", "website_sale_comparison.tour_comparison", "website_sale_wishlist.tour", "web_editor.tour", "website.tour.banner", "website.tour.contact", "website.tour.customize", "website.tour.rte", "website_blog.tour"]

log @ web.assets_common.js:3459

(anonymous) @ web.assets_common.js:3469

e @ jquery.min.js:2

t @ jquery.min.js:2

setTimeout (async)

(anonymous) @ jquery.min.js:2

c @ jquery.min.js:2

add @ jquery.min.js:2

(anonymous) @ jquery.min.js:2

Deferred @ jquery.min.js:2

then @ jquery.min.js:2

(anonymous) @ web.assets_common.js:3469

(anonymous) @ web.assets_common.js:44

setTimeout (async)

_.delay @ web.assets_common.js:44

log_when_loaded @ web.assets_common.js:3469

fire @ web.assets_common.js:796

fireWith @ web.assets_common.js:801

ready @ web.assets_common.js:809

completed @ web.assets_common.js:810

web.assets_common.js:3460 Non loaded modules:       (18) ["web_editor.editor", "web_editor.rte.summernote", "web_editor.snippet.editor", "web_editor.snippets.options", "web_editor.translate", "web_unsplash.image_widgets", "point_of_sale.editor", "website.editor", "website.rte.summernote", "website.snippets.options", "website.contentMenu", "website.editMenu", "website.seo", "website.translateMenu", "website.theme", "website_sale.editor", "website_blog.editor", "website_blog.s_latest_posts_editor"]0: "web_editor.editor"1: "web_editor.rte.summernote"2: "web_editor.snippet.editor"3: "web_editor.snippets.options"4: "web_editor.translate"5: "web_unsplash.image_widgets"6: "point_of_sale.editor"7: "website.editor"8: "website.rte.summernote"9: "website.snippets.options"10: "website.contentMenu"11: "website.editMenu"12: "website.seo"13: "website.translateMenu"14: "website.theme"15: "website_sale.editor"16: "website_blog.editor"17: "website_blog.s_latest_posts_editor"length: 18__proto__: Array(0)

log @ web.assets_common.js:3460

(anonymous) @ web.assets_common.js:3469

e @ jquery.min.js:2

t @ jquery.min.js:2

setTimeout (async)

(anonymous) @ jquery.min.js:2

c @ jquery.min.js:2

add @ jquery.min.js:2

(anonymous) @ jquery.min.js:2

Deferred @ jquery.min.js:2

then @ jquery.min.js:2

(anonymous) @ web.assets_common.js:3469

(anonymous) @ web.assets_common.js:44

setTimeout (async)

_.delay @ web.assets_common.js:44

log_when_loaded @ web.assets_common.js:3469

fire @ web.assets_common.js:796

fireWith @ web.assets_common.js:801

ready @ web.assets_common.js:809

completed @ web.assets_common.js:810

1
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ść
Difference Between Two Dates (result not showing up when diff = 0 Day)
datetime
Awatar
Awatar
Awatar
3
cze 25
1962
Data Exceeded error while importing data in Odoo v12 Rozwiązane
odooV12
Awatar
Awatar
Awatar
Awatar
Awatar
4
maj 24
8286
date time DB
datetime
Awatar
Awatar
1
lip 23
4764
Project and Timesheets
odooV12
Awatar
Awatar
1
lip 23
2904
Accepting Bancontact payments through Paypal
odooV12
Awatar
Awatar
Awatar
3
cze 23
4000
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