Can i use QWeb.render in javascript to replace a <div>
example
this._$homeMenu = this.$('.o_home_menu');
_onKeydown_searchText: function () {
var self = this;
self._$homeMenu.html(
QWeb.render('systray_odoo_search.search_result', {
widget: self
}));
},
in xml file
in xml file
<t t-name="systray_odoo_search.search_result">
<t t-set="result" t-value="widget._result"/>
<t t-if="result.success == false">
<div>No result planned.<t t-esc="record" />
</div>
</t>
<div id='content'>
<t t-foreach="result.data" t-as="record">
<div class="all test">
<t t-esc="record" />
</div>
</t>
</div>
</t>