Přejít na obsah
Odoo Menu
  • Přihlásit se
  • Vyzkoušejte zdarma
  • Aplikace
    Finance
    • Účetnictví
    • Fakturace
    • Výdaje
    • Spreadsheet (BI)
    • Dokumenty
    • Podpisy
    Prodej
    • CRM
    • Prodej
    • POS Obchod
    • POS Restaurace
    • Předplatné
    • Pronájem
    Webové stránky
    • Webové stránky
    • E-shop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Dodavatelský řetězec
    • Sklad
    • Výroba
    • PLM
    • Nákup
    • Údržba
    • Kvalita
    Lidské zdroje
    • Zaměstnanci
    • Nábor
    • Volno
    • Hodnocení zaměstnanců
    • Doporučení
    • Vozový park
    Marketing
    • Marketing sociálních sítí
    • Emailový marketing
    • SMS Marketing
    • Události
    • Marketingová automatizace
    • Dotazníky
    Služby
    • Projekt
    • Časové výkazy
    • Práce v terénu
    • Helpdesk
    • Plánování
    • Schůzky
    Produktivita
    • Diskuze
    • Schvalování
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Aplikace třetích stran Odoo Studio Odoo cloudová platforma
  • Branže
    Maloobchod
    • Knihkupectví
    • Obchod s oblečením
    • Obchod s nábytkem
    • Potraviny
    • Obchod s hardwarem
    • Hračkářství
    Food & Hospitality
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Guest House
    • Distributor nápojů
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Trades
    • Údržbář
    • IT hardware a podpora
    • Solar Energy Systems
    • Výrobce obuvi
    • Úklidové služby
    • HVAC Services
    Others
    • Nonprofit Organization
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Browse all Industries
  • Komunita
    Edukační program
    • Tutoriály
    • Dokumentace
    • Certifikace
    • Vzdělávání
    • Blog
    • Podcast
    Podpora vzdělávání
    • Vzdělávací program
    • Scale Up! Hra na firmu
    • Navštivte Odoo
    Získat software
    • Stáhnout
    • Porovnejte edice
    • Verze
    Spolupráce
    • Github
    • Fórum
    • Události
    • Překlady
    • Stát se partnerem
    • Services for Partners
    • Registrujte svou účetní firmu
    Získat služby
    • Najít partnera
    • Najít účetní
    • Setkejte se s poradcem
    • Implementační služby
    • Zákaznické reference
    • Podpora
    • Upgrady
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dohodnout demo
  • Ceník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účetnictví
  • Sklad
  • PoS
  • Projekty
  • MRP
All apps
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
Pomoc

Inherit and Custom Field in Template Room Meeting

Odebírat

Get notified when there's activity on this post

This question has been flagged
javascripttemplates
2 Odpovědi
2341 Zobrazení
Avatar
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
Avatar
Zrušit
Avatar
Ahmad Badawi
Autor Nejlepší odpověď

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
Avatar
Zrušit
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Nejlepší odpověď

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
Avatar
Zrušit
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)

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Přihlásit se
Related Posts Odpovědi Zobrazení Aktivita
Error: QWeb2: Template 'Tip' not found
javascript templates
Avatar
0
kvě 23
4399
access dictionary passed to template from java script
javascript templates
Avatar
0
čvn 20
3424
Save odoo website form content
javascript templates odoo17
Avatar
0
lis 24
2249
How to custom footer for client actions view
javascript templates qweb template view
Avatar
0
lis 16
4942
Cannot import @website_sale/js/utils
javascript
Avatar
Avatar
2
lis 25
477
Komunita
  • Tutoriály
  • Dokumentace
  • Fórum
Open Source
  • Stáhnout
  • Github
  • Runbot
  • Překlady
Služby
  • Odoo.sh hostování
  • Podpora
  • Upgrade
  • Nestandardní vývoj
  • Edukační program
  • Najít účetní
  • Najít partnera
  • Stát se partnerem
O nás
  • Naše společnost
  • Podklady značky
  • Kontakujte nás
  • Práce
  • Události
  • Podcast
  • Blog
  • Zákazníci
  • Právní dokumenty • Soukromí
  • Zabezpečení
الْعَرَبيّة 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 je balíček open-source aplikací, které pokrývají všechny potřeby vaší společnosti: CRM, e-shop, účetnictví, sklady, kasy, projektové řízení a další.

Unikátní nabídka od Odoo poskytuje velmi jednoduché uživatelské rozhraní a vše je integrované na jednom místě.

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