跳至內容
選單
此問題已被標幟
2 回覆
14460 瀏覽次數

Hi,

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

Thanks in advance

頭像
捨棄
最佳答案

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

頭像
捨棄
最佳答案

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

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
8月 24
6359
1
10月 22
24099
2
9月 21
12782
1
8月 21
8333
1
7月 21
4334