Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Aplikacije
    Finance
    • Knjigovodstvo
    • Obračun
    • Stroški
    • Spreadsheet (BI)
    • Dokumenti
    • Podpisovanje
    Prodaja
    • CRM
    • Prodaja
    • POS Shop
    • POS Restaurant
    • Naročnine
    • Najem
    Spletne strani
    • Website Builder
    • Spletna trgovina
    • Blog
    • Forum
    • Pogovor v živo
    • eUčenje
    Dobavna veriga
    • Zaloga
    • Proizvodnja
    • PLM
    • Nabava
    • Vzdrževanje
    • Kakovost
    Kadri
    • Kadri
    • Kadrovanje
    • Odsotnost
    • Ocenjevanja
    • Priporočila
    • Vozni park
    Marketing
    • Družbeno Trženje
    • Email Marketing
    • SMS Marketing
    • Dogodki
    • Avtomatizacija trženja
    • Ankete
    Storitve
    • Projekt
    • Časovnice
    • Storitve na terenu
    • Služba za pomoč
    • Načrtovanje
    • Termini
    Produktivnost
    • Razprave
    • Odobritve
    • IoT
    • Voip
    • Znanje
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industrije
    Trgovina na drobno
    • Book Store
    • Trgovina z oblačili
    • Trgovina s pohištvom
    • Grocery Store
    • Trgovina s strojno opremo računalnikov
    • Trgovina z igračami
    Food & Hospitality
    • Bar and Pub
    • Restavracija
    • Hitra hrana
    • Guest House
    • Beverage Distributor
    • Hotel
    Nepremičnine
    • Real Estate Agency
    • Arhitekturno podjetje
    • Gradbeništvo
    • Estate Management
    • Vrtnarjenje
    • Združenje lastnikov nepremičnin
    Svetovanje
    • Računovodsko podjetje
    • Odoo Partner
    • Marketinška agencija
    • Law firm
    • Pridobivanje talentov
    • Audit & Certification
    Proizvodnja
    • Tekstil
    • Metal
    • Pohištvo
    • Hrana
    • Brewery
    • Poslovna darila
    Health & Fitness
    • Športni klub
    • Trgovina z očali
    • Fitnes center
    • Wellness Practitioners
    • Lekarna
    • Frizerski salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Sistemi sončne energije
    • Izdelovalec čevljev
    • Čistilne storitve
    • HVAC Services
    Ostali
    • Neprofitna organizacija
    • Agencija za okolje
    • Najem oglasnih panojev
    • Fotografija
    • Najem koles
    • Prodajalec programske opreme
    Browse all Industries
  • Skupnost
    Learn
    • Tutorials
    • Dokumentacija
    • Certifikati
    • Šolanje
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Prenesi
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Dogodki
    • Prevodi
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Sklici kupca
    • Podpora
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Določanje cen
  • Pomoč

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

  • CRM
  • e-Commerce
  • Knjigovodstvo
  • Zaloga
  • PoS
  • Projekt
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
Pomoč

Unexpected HTML Escaping in QWeb

Naroči se

Get notified when there's activity on this post

This question has been flagged
v17v16Appointments
1854 Prikazi
Avatar
Christian Nicholson

Hello folks,

We've written a custom module to extend the Appointments app to allow scheduling to occur with Zoom links instead of using the built in WebRTC Discuss or Google Meet options, however when the invite emails go out, we are seeing that the description field is being rendered as escaped text instead of embedded html.

After reviewing the documentation for the changed introduced in v16 ( we are running v17), we noted that the default behavior is to escape anything deemed unsafe, however as the description field on the calendar is set to an html field type, we'd expect this not to be escaped per the documentation.

It's worth noting that if we don't append anything to the field, it renders as expected per the default behavior and it appears to render as html, however when we try to append to it (we have validated our updates are still consistent with valid html) it is being escaped.

Looking for any ideas as to what we might be missing here!

Custom function in the CalendarEvent extension module shown here to show how we are modifying that field:

    @api.depends('zoom_meet_code', 'zoom_meet_url')
    def _compute_description(self):
        events_w_zoom = self.filtered(lambda event: event.videocall_source == 'zoom_call')
        for event in events_w_zoom:
            event.location = self.zoom_meet_url
            event.videocall_location = self.zoom_meet_url
            event.description += "
Join the Zoom Meeting at " + str(self.videocall_redirection)

We have also confirmed via some debug printing statements the contents of event.description is consistently the correct html code

0
Avatar
Opusti
Christian Nicholson
Avtor

Also for reference, we did try wrapping the urls in href/a tags as well but had to cut that from here in order to post

Christian Nicholson
Avtor

Adding some additional info in the event it is of use around the inherited class
class CalendarEvent(models.Model):
"""Inheriting Calendar events to create zoom meetings"""
_inherit = 'calendar.event'

is_zoom_meet = fields.Boolean(string='Zoom Meet',
help='Enable, if zoom meeting.')
zoom_meet_url = fields.Char(string='Zoom Meet URL',
help='To joining Meeting URL')
zoom_meet_code = fields.Char(string='Zoom Meet Code',
help='Joining Meeting Code')
zoom_event = fields.Char(string='Zoom Event ID',
help='Event ID of the zoom meet')
videocall_location = fields.Char('Meeting URL', related='zoom_meet_url')
description = fields.Text('Description',
compute="_compute_description", store=True)
company_id = fields.Many2one('res.company', string='Company')
zoom_users_list = fields.Selection(related='company_id.zoom_users_list',
string='Zoom User',
help='Select the Zoom account to use when scheduling this meeting',
readonly=False
)
videocall_source = fields.Selection(selection_add=[('zoom_call', 'Zoom')])

And the following in the section in question from the email template:

_____
<li t-if="object.videocall_redirection">
How to Join:
<t t-if="object.videocall_source == 'discuss'"> Join with Odoo Discuss</t>
<t t-else=""> Join at</t><br/>
<a t-attf-href="{{ object.videocall_redirection }}" target="_blank" t-out="object.videocall_redirection or ''">www.mycompany.com/calendar/join_videocall/xyz</a>
</li>
</ul>
<t t-if="not is_html_empty(object.description)">
<li>Description of the event:
<t t-out="object.description"/>
</li>
_____

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

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

Prijavi
Related Posts Odgovori Prikazi Aktivnost
Manually Accept Website Appointment Bookings
configuration bookings v17 Appointments
Avatar
0
sep. 24
1210
Ya es posible hacer Upgrade de v17 a v17.1 ?
v17
Avatar
Avatar
1
okt. 25
1386
How to add a new Many2one field in res.config.settings? Solved
v17
Avatar
Avatar
Avatar
Avatar
4
okt. 25
3838
Add field to ALL models in Odoo
v17
Avatar
Avatar
Avatar
2
sep. 25
2508
How to disable Email notification - You have been assigned to Solved
v17
Avatar
Avatar
Avatar
Avatar
4
sep. 25
7963
Community
  • Tutorials
  • Dokumentacija
  • Forum
Open Source
  • Prenesi
  • Github
  • Runbot
  • Prevodi
Services
  • Odoo.sh Hosting
  • Podpora
  • Nadgradnja
  • Custom Developments
  • Izobraževanje
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Sredstva blagovne znamke
  • Kontakt
  • Zaposlitve
  • Dogodki
  • Podcast
  • Blog
  • Stranke
  • Pravno • Zasebnost
  • Varnost
الْعَرَبيّة 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 is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

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