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
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
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
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký