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
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
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
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up