Skip to Content
Odoo मेन्यू
  • Sign in
  • मुफ़्त में आज़माएं
  • ऐप्लिकेशन
    फ़ाइनेंस
    • अकाउंटिंग
    • इनवॉइसिंग
    • एक्सपेंस
    • स्प्रेडशीट (बीआई)
    • डॉक्यूमेंट्स
    • साइन
    सेल्स
    • सीआरएम
    • सेल्स
    • पीओएस शॉप
    • पीओएस रेस्टोरेंट
    • सब्सक्रिप्शन
    • रेंटल
    वेबसाइट
    • वेबसाइट बिल्डर
    • ई-कॉमर्स
    • ब्लॉग
    • फ़ोरम
    • लाइव चैट
    • ई-लर्निंग
    सप्लाई चेन
    • इन्वेंट्री
    • मैन्युफ़ैक्चरिंग
    • पीएलएम
    • परचेज़
    • मेंटेनेंस
    • क्वालिटी
    मानव संसाधन
    • कर्मचारी
    • रिक्रूटमेंट
    • टाइम ऑफ़
    • अप्रेज़ल
    • रेफ़रल
    • फ़्लीट
    मार्केटिंग
    • सोशल मार्केटिंग
    • ईमेल मार्केटिंग
    • एसएमएस मार्केटिंग
    • इवेंट
    • मार्केटिंग ऑटोमेशन
    • सर्वे
    सेवाएं
    • प्रोजेक्ट
    • टाइमशीट
    • फ़ील्ड सर्विस
    • हेल्पडेस्क
    • प्लानिंग
    • अपॉइंटमेंट
    प्रॉडक्टिविटी
    • डिस्कस
    • अप्रूवल
    • आईओटी
    • वीओआईपी
    • नॉलेज
    • WhatsApp
    तीसरे पक्ष के ऐप्लिकेशन Odoo स्टूडियो Odoo क्लाउड प्लेटफ़ॉर्म
  • इंडस्ट्री
    रीटेल
    • बुक स्टोर
    • क्लोदिंग स्टोर
    • फ़र्नीचर स्टोर
    • ग्रॉसरी स्टोर
    • हार्डवेयर स्टोर
    • टॉय स्टोर
    Food & Hospitality
    • बार और पब
    • रेस्टोरेंट
    • फ़ास्ट फ़ूड
    • Guest House
    • बेवरिज डिस्ट्रीब्यूटर
    • होटल
    रियल एस्टेट
    • Real Estate Agency
    • आर्किटेक्चर फ़र्म
    • कंसट्रक्शन
    • एस्टेट मैनेजमेंट
    • गार्ड्निंग
    • प्रॉपर्टी ओनर असोसिएशन
    कंसल्टिंग
    • अकाउंटिंग फ़र्म
    • Odoo पार्टनर
    • मार्केटिंग एजेंसी
    • लॉ फ़र्म
    • टैलेंट ऐक्विज़िशन
    • ऑडिट & सर्टिफ़िकेशन
    मैन्युफ़ैक्चरिंग
    • टेक्सटाइल
    • Metal
    • फ़र्नीचर
    • फ़ूड
    • Brewery
    • कॉर्पोरेट गिफ़्ट
    हेल्थ & फिटनेस
    • स्पोर्ट्स क्लब
    • आईवियर स्टोर
    • फिटनेस सेंटर
    • वेलनेस प्रैक्टिशनर
    • फॉर्मेसी
    • हेयर सैलून
    Trades
    • Handyman
    • आईटी हॉर्डवेयर और सपोर्ट
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    अन्य
    • Nonprofit Organization
    • एन्वायरमेंटल एजेंसी
    • बिलबोर्ड रेंटल
    • फ़ोटोग्राफी
    • बाइक लीजिंग
    • सॉफ़्टवेयर रीसेलर
    Browse all Industries
  • कम्यूनिटी
    सीखें
    • ट्यूटोरियल्स
    • दस्तावेज़
    • सर्टिफ़िकेशन
    • ट्रेनिंग
    • ब्लॉग
    • पॉडकास्ट
    शिक्षा को बढ़ावा दें
    • एजुकेशन प्रोग्राम
    • स्केल अप! बिजनेस गेम
    • Odoo के ऑफ़िस में आएं
    सॉफ़्टवेयर पाएं
    • डाउनलोड
    • वर्शन की तुलना करें
    • रिलीज़
    साथ मिलकर काम करें
    • Github
    • फ़ोरम
    • इवेंट
    • अनुवाद
    • पार्टनर बनें
    • Services for Partners
    • अपना अकाउंटिंग फ़र्म रजिस्टर करें
    सेवाएं पाएं
    • पार्टनर ढूंढें
    • अकाउंटेंट खोजें
    • सलाहकार की मदद लें
    • इम्प्लिमेंटेशन सेवाएं
    • कस्टमर रेफ़रेंस
    • सहायता
    • अपग्रेड
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    डेमो देखें
  • कीमत
  • सहायता

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

  • सीआरएम
  • e-Commerce
  • लेखांकन
  • इन्वेंटरी
  • PoS
  • प्रोजेक्ट
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
टैग (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
टैग (View all)
odoo accounting v14 pos v15
About this forum
Help

Inherit and Custom Field in Template Room Meeting

Subscribe

Get notified when there's activity on this post

This question has been flagged
javascripttemplates
2 Replies
2352 Views
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
Discard
Avatar
Ahmad Badawi
Author Best Answer

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
Discard
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Best Answer

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
Discard
Ahmad Badawi
Author

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!

Sign up
Related Posts Replies Views Activity
Error: QWeb2: Template 'Tip' not found
javascript templates
Avatar
0
मई 23
4406
access dictionary passed to template from java script
javascript templates
Avatar
0
जून 20
3431
Save odoo website form content
javascript templates odoo17
Avatar
0
नव॰ 24
2260
How to custom footer for client actions view
javascript templates qweb template view
Avatar
0
नव॰ 16
4965
Cannot import @website_sale/js/utils
javascript
Avatar
Avatar
2
नव॰ 25
496
कम्यूनिटी
  • ट्यूटोरियल्स
  • दस्तावेज़
  • फ़ोरम
ओपन सोर्स
  • डाउनलोड
  • Github
  • रनबॉट
  • अनुवाद
सेवाएं
  • Odoo.sh Hosting
  • सहायता
  • अपग्रेड
  • कस्टम डेवलपमेंट्स
  • शिक्षा
  • अकाउंटेंट खोजें
  • पार्टनर ढूंढें
  • पार्टनर बनें
हमारे बारे में
  • हमारी कंपनी
  • ब्रांड ऐसेट
  • संपर्क करें
  • नौकरियां
  • इवेंट
  • पॉडकास्ट
  • ब्लॉग
  • ग्राहक
  • लीगल • गोपनीयता
  • सुरक्षा
الْعَرَبيّة 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, बिज़नेस से जुड़े ऐप्लिकेशन का एक कलेक्शन है जो ओपन सोर्स पर आधारित है. इसमें आपकी कंपनी की हर ज़रूरत के लिए ऐप्लिकेशन हैं. जैसे, सीआरएम, ई-कॉमर्स, अकाउंटिंग, इन्वेंट्री, पॉइंट ऑफ़ सेल, प्रोजेक्ट मैनेजमेंट वगैरह.

Odoo की सबसे बड़ी खासियत है कि यह इस्तेमाल करने में बहुत आसान है और यह पूरी तरह से इंटिग्रेट किया हुआ है.

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