hello,i want to call or execute javascript code inside the qweb template.i am trying t-js but its not working
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Boekhouding
- Voorraad
- PoS
- Project
- MRP
Deze vraag is gerapporteerd
in projects_report.xml file:
<template id="minimal_layout1">
<t t-raw="'<base href=%s>' % base_url"/>
<!DOCTYPE html>
<html style="height: 0;">
<head>
<script type="text/javascript">
function subst() {
alert("odoo");
document.write(5+6);
}
</script>
</head>
<body class="container" onload="subst()">
<t t-raw="body"/>
</body>
</html>
</template>
<t t-call="projects_report.minimal_layout1"/>
or
<template id="summernote1" name="Summernote">
<script type="text/javascript">
(function () {
alert("adsa global");
document.write("adsa");
})();
</script>
</template>
<t t-call="projects_report.summernote1"/>
am trying these types to call javascript inside the qweb but the function is not loading ,its not throwing any errors.i am very new to qweb can you plz solve this .
To help you better can you provide your code and the error / log ?
Kind regards
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
Aanmelden