title: odoo 8, add javascript file to front end website
body: <p>I've followed instructions in this post </p>
  
  <p><a href="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" rel="nofollow">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</a></p>
  
  <p>to add javascript file to the front end (inheriting a template from website.assets_frontend)  </p>
  
  <p>When I log with a user that has permission to alter qweb the js is downloaded, but when I log with a user without that permission or with the anonymous user, the script is not downloaded.</p>
  
  <p>I need this js script for anonymous users. What's wrong? what should i do?</p>
  
  <pre><code>&lt;template id="assets_frontend" inherit_id="website.assets_frontend" name="menora_website assets"&gt; 
    &lt;xpath expr="/t" position="inside"&gt; 
      &lt;script type="text/javascript" src="/website_my_module/static/src/js/my_assets.js"&gt;&lt;/script&gt; 
    &lt;/xpath&gt; 
  &lt;/template&gt; 
  </code></pre>
  
  <p>this code works for admin user but not for the anonymous user </p>
  
  <pre><code>//my_assets.js 
  $(document).ready(function () { 
    "use strict"; 
    var website = openerp.website; var _t = openerp._t; 
    $('#birdthdate').datepicker(); 
  });
  </code></pre>