odoo 8, add javascript file to front end website -


i've followed instructions in post

https://www.odoo.com/es_es/forum/help-1/question/how-to-add-css-and-js-javascript-files-in-openerp-7-odoo-8-module-76719

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

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -