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

Inherit and Custom Field in Template Room Meeting

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
javascripttemplates
2 Odpowiedzi
2349 Widoki
Awatar
Ahmad Badawi

Hello good afternoon, I would like to ask about inheriting this default odoo template and adding something to it and modifying it a little bit.

I have made it like this


<?xml version=“1.0” encoding=“utf-8”?>

<templates>

    <t t-name=“room.RoomBookingSidebar.inherit” t-inherit=“room.RoomBookingSidebar”>

        <xpath expr=“//div[@class=‘my-2 border-bottom’]” position=“inside”>

            <div t-if=“props.floor” class=“mb-2”>

                <h5>Floor: <span t-out=“props.floor”/></h5>

            </div>

        </xpath>

    </t>

</templates>



error appears ID not found can anyone help with this, thanks you

code original 


<?xml version="1.0" encoding="utf-8"?><templates> <t t-name="room.RoomBookingView"> <div class="row d-flex g-0 h-lg-100 bg-white"> <div class="o_room_booking_main col-lg-8 col-xl-9 position-relative d-flex flex-column h-lg-100 overflow-lg-auto"> <t t-if="state.scheduleBooking or state.bookingToEdit"> <RoomBookingForm bookings="state.bookings" createBooking.bind="scheduleBooking" cancel.bind="resetBookingForm" editBooking.bind="editBooking" bookingName="state.bookingName" bookingToEdit="state.bookingToEdit"/> </t> <div t-else="" class="d-flex flex-column flex-grow-1 justify-content-between gap-5 p-3 text-white fs-2" t-attf-style="background-image: linear-gradient(#{bgColor}, #{bgColor}), url('#{manageRoomUrl}/background')"> <span class="position-absolute top-0 start-0 w-100 h-100 bg-gradient"/> <div class="o_room_top position-relative text-end"> <RoomDisplayTime/> </div> <div class="position-relative d-flex flex-fill flex-column align-items-center justify-content-around gap-3 w-100"> <t t-if="!state.currentBooking"> <t t-if="state.scheduleBookingQuickCreate"> <h1 class="text-white">Booking Now</h1> <div> <input t-if="!nextBooking || nextBooking.interval.start > now.plus({minutes: 15})" t-model.lazy.trim="state.bookingName" class="form-control bg-white fs-4" placeholder="Booking Name"/> <div class="d-flex justify-content-center gap-3 my-3"> <button class="btn btn-light btn-lg flex-grow-1 rounded-pill px-3 px-lg-5" t-if="!nextBooking || nextBooking.interval.start > now.plus({minutes: 15})" t-on-click="() => this.quickCreateBooking(15)"> 15 min </button> <div t-else="" class="d-flex flex-column align-items-center gap-2 p-3 fs-6"> <i class="fa fa-warning fa-2x"/> The next booking is starting soon. </div> <button class="btn btn-light btn-lg flex-grow-1 rounded-pill px-3 px-lg-5" t-if="!nextBooking || nextBooking.interval.start > now.plus({minutes: 30})" t-on-click="() => this.quickCreateBooking(30)"> 30 min </button> <button class="btn btn-light btn-lg flex-grow-1 rounded-pill px-3 px-lg-5" t-if="!nextBooking || nextBooking.interval.start > now.plus({minutes: 60})" t-on-click="() => this.quickCreateBooking(60)"> 1 hour </button> </div> <div t-if="!nextBooking" class="d-flex mt-3 w-100"> <span class="flex-grow-1 align-self-center border"/> <span class="mx-3 fs-6 text-uppercase">Or</span> <span class="flex-grow-1 align-self-center border"/> </div> </div> </t> <t t-else=""> <div class="d-flex flex-column align-items-center"> <i class="fa fa-check-circle fa-3x"/> <h1 class="mb-0 text-uppercase fw-bold display-3 text-white">Available</h1> </div> </t> </t> <t t-else=""> <div class="d-flex flex-column align-items-center"> <i class="fa fa-times-circle fa-3x"/> <h1 class="mb-0 text-uppercase fw-bold display-3 text-white">Booked</h1> <span t-out="state.currentBooking.name" class="fs-5 opacity-75"/> <RoomBookingRemainingTime endTime="state.currentBooking.interval.end"/> </div> </t> <div class="d-flex flex-column flex-xl-row gap-4"> <button t-if="!state.currentBooking and !state.scheduleBookingQuickCreate" class="btn btn-light btn-lg d-flex justify-content-between align-items-center gap-3 rounded-pill py-lg-3 px-3 px-lg-5" t-on-click="() => this.state.scheduleBookingQuickCreate = true"> Book now <i class="fa fa-plus-circle"/> </button> <button class="btn btn-lg d-flex justify-content-between align-items-center gap-3 rounded-pill py-lg-3 px-3 px-lg-5" t-att-class="state.currentBooking ? 'btn-light' : 'btn-dark'" t-on-click="() => this.state.scheduleBooking = true"> Schedule Booking <i class="fa fa-clock-o"/> </button> </div> </div> <div class="o_room_bottom position-relative d-flex gap-3 w-100" t-if="state.scheduleBookingQuickCreate"> <button class="btn btn-lg flex-grow-1 bg-dark bg-opacity-25 text-white" t-on-click="resetBookingForm"> Cancel </button> </div> </div> </div> <div class="o_room_sidebar col-lg-4 col-xl-3 position-relative border-start bg-100"> <t t-call="room.RoomBookingSidebar"/> </div> </div> </t>

 <t t-name="room.RoomBookingSidebar"> <div class="position-lg-absolute top-0 start-0 end-0 bottom-0 d-flex flex-column justify-content-between h-100 p-3 overflow-auto"> <!-- todo: check rtl --> <div class="my-2 border-bottom"> <h4 t-out="props.name"/> <div class="mb-3 text-muted" t-if="props.description" t-out="roomDescription"/> </div> <div t-if="state.bookings.length === 0" class="d-flex justify-content-center flex-column flex-fill py-3 text-center"> <h5>No Bookings Planned</h5> <span class="text-muted">This room is as free as a fish in a sea of endless possibilities</span> </div> <div t-else="" class="flex-fill pt-1"> <!-- Today section is shown even if there are no bookings for this day --> <h6 class="mt-3 text-capitalize" t-out="state.currentDate.toRelativeCalendar()"/> <div class="list-group"> <t t-set="previous_date" t-value="state.currentDate"/> <t t-foreach="state.bookings" t-as="booking" t-key="booking.id"> <t t-if="booking.interval.start.startOf('day') > previous_date"> <div t-if="booking_first" class="text-center text-muted"> No Bookings for Today </div> <h6 class="mt-4 mb-2" t-out="booking.interval.start.toLocaleString(dateFormat)"/> <t t-set="previous_date" t-value="booking.interval.start.startOf('day')"/> </t> <div class="list-group-item list-group-item-action d-flex justify-content-between align-items-start cursor-pointer" t-att-class="state.bookingToEdit?.id === booking.id ? 'active' : ''" t-on-click="() => state.bookingToEdit = booking"> <div class="text-break"> <div class="d-flex align-items-center"> <span t-out="booking.interval.start.toLocaleString(timeFormat)"/> <i class="oi oi-arrow-right mx-1 smaller text-muted"/> <span t-out="booking.interval.end.toLocaleString(timeFormat)"/> </div> <div class="smaller" t-out="booking.name"/> </div> <button class="btn btn-link btn-dark me-n3 mt-n2 p-3 lh-1 smaller" t-on-click.stop="() => this.deleteBooking(booking.id)"> <i class="fa fa-trash"/> </button> </div> </t> </div> </div> </div> </t></templates>



0
Awatar
Odrzuć
Awatar
Ahmad Badawi
Autor Najlepsza odpowiedź

I've tried it that way and the error appears

this code in odoo 17


RPC_ERROR

Odoo Server Error

Traceback (most recent call last):

  File "/opt/odoo17e/odoo/convert.py", line 676, in convert_xml_import

    relaxng.assert_(doc)

  File "src/lxml/etree.pyx", line 3648, in lxml.etree._Validator.assert_

AssertionError: Document does not comply with schema


The above server error caused the following client error:

RPC_ERROR://localhost:8017/web/assets/ee4934e/web.assets_web.min.js:2876:163)

    at XMLHttpRequest.<anonymous> (http://localhost:8017/web/assets/ee4934e/web.assets_web.min.js:2880:13)

0
Awatar
Odrzuć
Awatar
Cybrosys Techno Solutions Pvt.Ltd
Najlepsza odpowiedź

Hi,

Use the following code,


<?xml version=“1.0” encoding=“utf-8”?>

<templates>

    <t t-name=“module_name.RoomBookingSidebarInherit” t-inherit=“room.RoomBookingSidebar”>

        <xpath expr=“//div[@class=‘my-2 border-bottom’]” position=“inside”>

            <div t-if=“props.floor” class=“mb-2”>

                <h5>Floor: <span t-out=“props.floor”/></h5>

            </div>

        </xpath>

    </t>

</templates>


Replace module_name with your module and add 'room' in depends of manifest


'depends': ['room']


For more details, refer to the book:

https://www.cybrosys.com/blog/an-overview-of-template-inheritance-in-odoo-16



Hope it helps

0
Awatar
Odrzuć
Ahmad Badawi
Autor

I've tried it that way and the error appears

this code in odoo 17

RPC_ERROR

Odoo Server Error

Traceback (most recent call last):

File "/opt/odoo17e/odoo/convert.py", line 676, in convert_xml_import

relaxng.assert_(doc)

File "src/lxml/etree.pyx", line 3648, in lxml.etree._Validator.assert_

AssertionError: Document does not comply with schema

The above server error caused the following client error:

RPC_ERROR://localhost:8017/web/assets/ee4934e/web.assets_web.min.js:2876:163)

at XMLHttpRequest.<anonymous> (http://localhost:8017/web/assets/ee4934e/web.assets_web.min.js:2880:13)

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ść
Error: QWeb2: Template 'Tip' not found
javascript templates
Awatar
0
maj 23
4403
access dictionary passed to template from java script
javascript templates
Awatar
0
cze 20
3429
Save odoo website form content
javascript templates odoo17
Awatar
0
lis 24
2259
How to custom footer for client actions view
javascript templates qweb template view
Awatar
0
lis 16
4960
Cannot import @website_sale/js/utils
javascript
Awatar
Awatar
2
lis 25
496
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