Passa al contenuto
Odoo Menu
  • Accedi
  • Provalo gratis
  • App
    Finanze
    • Contabilità
    • Fatturazione
    • Note spese
    • Fogli di calcolo (BI)
    • Documenti
    • Firma
    Vendite
    • CRM
    • Vendite
    • Punto vendita Negozio
    • Punto vendita Ristorante
    • Abbonamenti
    • Noleggi
    Siti web
    • Configuratore sito web
    • E-commerce
    • Blog
    • Forum
    • Live chat
    • E-learning
    Supply chain
    • Magazzino
    • Produzione
    • PLM
    • Acquisti
    • Manutenzione
    • Qualità
    Risorse umane
    • Dipendenti
    • Assunzioni
    • Ferie
    • Valutazioni
    • Referral dipendenti
    • Parco veicoli
    Marketing
    • Social marketing
    • E-mail marketing
    • SMS marketing
    • Eventi
    • Marketing automation
    • Sondaggi
    Servizi
    • Progetti
    • Fogli ore
    • Assistenza sul campo
    • Helpdesk
    • Pianificazione
    • Appuntamenti
    Produttività
    • Comunicazioni
    • Approvazioni
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    App di terze parti Odoo Studio Piattaforma cloud Odoo
  • Settori
    Retail
    • Libreria
    • Negozio di abbigliamento
    • Negozio di arredamento
    • Alimentari
    • Ferramenta
    • Negozio di giocattoli
    Cibo e ospitalità
    • Bar e pub
    • Ristorante
    • Fast food
    • Pensione
    • Grossista di bevande
    • Hotel
    Agenzia immobiliare
    • Agenzia immobiliare
    • Studio di architettura
    • Edilizia
    • Gestione immobiliare
    • Impresa di giardinaggio
    • Associazione di proprietari immobiliari
    Consulenza
    • Società di contabilità
    • Partner Odoo
    • Agenzia di marketing
    • Studio legale
    • Selezione del personale
    • Audit e certificazione
    Produzione
    • Tessile
    • Metallo
    • Arredamenti
    • Alimentare
    • Birrificio
    • Ditta di regalistica aziendale
    Benessere e sport
    • Club sportivo
    • Negozio di ottica
    • Centro fitness
    • Centro benessere
    • Farmacia
    • Parrucchiere
    Commercio
    • Tuttofare
    • Hardware e assistenza IT
    • Ditta di installazione di pannelli solari
    • Calzolaio
    • Servizi di pulizia
    • Servizi di climatizzazione
    Altro
    • Organizzazione non profit
    • Ente per la tutela ambientale
    • Agenzia di cartellonistica pubblicitaria
    • Studio fotografico
    • Punto noleggio di biciclette
    • Rivenditore di software
    Carica tutti i settori
  • Community
    Apprendimento
    • Tutorial
    • Documentazione
    • Certificazioni 
    • Formazione
    • Blog
    • Podcast
    Potenzia la tua formazione
    • Programma educativo
    • Scale Up! Business Game
    • Visita Odoo
    Ottieni il software
    • Scarica
    • Versioni a confronto
    • Note di versione
    Collabora
    • Github
    • Forum
    • Eventi
    • Traduzioni
    • Diventa nostro partner
    • Servizi per partner
    • Registra la tua società di contabilità
    Ottieni servizi
    • Trova un partner
    • Trova un contabile
    • Incontra un esperto
    • Servizi di implementazione
    • Testimonianze dei clienti
    • Supporto
    • Aggiornamenti
    GitHub Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Richiedi una demo
  • Prezzi
  • Aiuto

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

  • CRM
  • e-Commerce
  • Contabilità
  • Magazzino
  • PoS
  • Progetti
  • MRP
All apps
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
Assistenza

Unexpected HTML Escaping in QWeb

Iscriviti

Ricevi una notifica quando c'è un'attività per questo post

La domanda è stata contrassegnata
v17v16Appointments
1856 Visualizzazioni
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
Abbandona
Christian Nicholson
Autore

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
Autore

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>
_____

Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!

Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!

Registrati
Post correlati Risposte Visualizzazioni Attività
Manually Accept Website Appointment Bookings
configuration bookings v17 Appointments
Avatar
0
set 24
1212
Ya es posible hacer Upgrade de v17 a v17.1 ?
v17
Avatar
Avatar
1
ott 25
1386
How to add a new Many2one field in res.config.settings? Risolto
v17
Avatar
Avatar
Avatar
Avatar
4
ott 25
3852
Add field to ALL models in Odoo
v17
Avatar
Avatar
Avatar
2
set 25
2514
How to disable Email notification - You have been assigned to Risolto
v17
Avatar
Avatar
Avatar
Avatar
4
set 25
7969
Community
  • Tutorial
  • Documentazione
  • Forum
Open source
  • Scarica
  • Github
  • Runbot
  • Traduzioni
Servizi
  • Hosting Odoo.sh
  • Supporto
  • Aggiornamenti
  • Sviluppi personalizzati
  • Formazione
  • Trova un contabile
  • Trova un partner
  • Diventa nostro partner
Chi siamo
  • La nostra azienda
  • Branding
  • Contattaci
  • Lavora con noi
  • Eventi
  • Podcast
  • Blog
  • Clienti
  • Note legali • Privacy
  • Sicurezza
الْعَرَبيّة 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 è un gestionale di applicazioni aziendali open source pensato per coprire tutte le esigenze della tua azienda: CRM, Vendite, E-commerce, Magazzino, Produzione, Fatturazione elettronica, Project Management e molto altro.

Il punto di forza di Odoo è quello di offrire un ecosistema unico di app facili da usare, intuitive e completamente integrate tra loro.

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