odoo 8, add javascript file to front end website -
i've followed instructions in post
to add javascript file front end (inheriting template website.assets_frontend)
when log user has permission alter qweb js downloaded, when log user without permission or anonymous user, script not downloaded.
i need js script anonymous users. what's wrong? should do?
<template id="assets_frontend" inherit_id="website.assets_frontend" name="menora_website assets"> <xpath expr="/t" position="inside"> <script type="text/javascript" src="/website_my_module/static/src/js/my_assets.js"></script> </xpath> </template>
this code works admin user not anonymous user
//my_assets.js $(document).ready(function () { "use strict"; var website = openerp.website; var _t = openerp._t; $('#birdthdate').datepicker(); });
my guess line
<xpath expr="/t" position="inside">
change expr="/t"
expr="."
shown in reference
Comments
Post a Comment