I have created a module named test_module with the following structure:
- __init__.py
- __openerp__.py
- Views:
template.xml - static
-- src
-- js
-- test.js - controllers
-- main.py - data
-- data.xml
And in the template.xml I have specified the JS file as follows in a template
<template id="test_template">
<script type="text/javascript" language="JavaScript" src="/gastro_website/static/src/js/gastro_registration.js"/>
<t t-call="website.layout">
-----------------------------
-------------------------------
</t>
</template>
and the test.js file is
openerp.test_module = function (instance, local) {
console.log('qqqqqqqqqqqqqqqqqqqqqqqqqqqqqq');
};
But on loading the page for the template shows in console of the browser:
Uncaught ReferenceError: openerp is not defined
which is from the test.js file
How to fix this?
were you able to solve this problem?