Skip to Content
Menu
This question has been flagged

Hi,

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

Thanks in advance

Avatar
Discard
Best Answer

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
Discard
Best Answer

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

Avatar
Discard
Related Posts Replies Views Activity
2
Aug 24
5004
1
Oct 22
22090
2
Sep 21
11227
1
Aug 21
7243
1
Jul 21
3436