I get this error when render a template
Uncaught ReferenceError: odoo is not defined at btn.js:1My assets
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="asset_frontend_ch_pack" name="Product list">
<xpath expr="." position="inside">
<link href="vendor_package_frontend/static/css/styles.css" rel="stylesheet"/>
<script type="text/javascript" src="/vendor_package_frontend/static/js/jquery.min.js"></script>
<script type="text/javascript" src="/vendor_package_frontend/static/js/popper-utils.min.js"></script>
<script type="text/javascript" src="/vendor_package_frontend/static/js/popper.min.js"></script>
<script type="text/javascript" src="/vendor_package_frontend/static/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/vendor_package_frontend/static/js/all.min.js"></script>
<script type="text/javascript" src="/vendor_package_frontend/static/js/jquery.validate.min.js"></script>
<script type="text/javascript" src="/vendor_package_frontend/static/js/jquery.bxslider.min.js"></script>
<script type="text/javascript" src="/vendor_package_frontend/static/js/scripts.js"></script>
<script type="text/javascript" src="/vendor_package_frontend/static/js/btn.js"></script>
</xpath>
</template>
</odoo>
btn.js
odoo.define('vendor_package_frontend.btn', function (require) {
"use strict";
// var ajax = require('web.ajax');
//
// $(document).ready(function () {
// console.log(ajax);
// });
console.log('Really?');
})
and template where it call
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="change_package">
<head>
<t t-call="vendor_package_frontend.asset_frontend_ch_pack"></t>
<t t-call="vendor_package_frontend.sidebar"></t>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="keywords" content=""/>
<meta name="description" content=""/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
</head>
How can i fix it?
Ex template: https://github.com/odoo/odoo/blob/11.0/addons/web/static/src/xml/base.xml