I'm just starting with odoo v11 and I can't add javascript code to my new custom module, when adding the template with the following code it throws me an error loading the module:
error: Some modules could not be started
Failed modules: ["timers.countdown_timer"]
here is my javascript code:
odoo.define('timers.countdown_timer', function(require) {
'use strict';
alert('Alert');
var timers = new instance.web.Model('timers.timer');
});
(the alert is showed but when closed it throws the error)
here is my code to add the template:
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="timers_backend" name="rental_timer_backend" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/timers/static/src/js/countdown_timer.js"></script>
</xpath>
</template>
</data>
</odoo>