Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
14466 Vistas

Hi,

I need to render a xml template from javascript in odoo 12, can i anyone help me out this.

Thanks in advance

Avatar
Descartar
Mejor respuesta

Hi,

We can render a template from JavaScript using Qweb.render, try the code below

var core = require('web.core');
var QWeb = core.qweb;
var rendered_html = QWeb.render('template_name',{ key: value });

Hope it helps

Avatar
Descartar
Mejor respuesta

You can check this addon, here template is rendered from JS explicitly. https://www.odoo.com/apps/modules/12.0/hr_dashboard/

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
ago 24
6369
1
oct 22
24111
2
sept 21
12793
1
ago 21
8340
1
jul 21
4339