0

this question has already been answered here:

https://stackoverflow.com/questions/32846826/how-to-add-css-files-to-a-custom-module-in-odoo-8#=

The css link worked but it didn't work with the js link, the server breaks down.

Could you please help! Here's my code

<openerp>
  <data>
    <template id="assets_backend" name="mymodule css assets" inherit_id="web.assets_backend">
      <xpath expr="." position="inside">
        <script src="https://code.jquery.com/jquery-3.1.0.min.js"></script>
        <script type="text/javascript" src="/islam/static/src/js/javascript.js"></script>
        <link rel="stylesheet" href="/islam/static/src/css/style.css"/>         
      </xpath>
    </template>   
  </data>
</openerp>

PS: this line : indicates the file where are defined the functions used in my script.

Community
  • 1
  • 1

1 Answers1

0

Check out the example shown in following:

/addons/account/views/account.xml

This will show you how to add the javascript and css files to your module.

Hardik Patadia
  • 1,969
  • 16
  • 20
  • I believe that i followed the same example, but i added this link which indicates the library where the js functions are defined. i think the problem is with the link is there any solutions ? – IsLàm Nadih Aug 16 '16 at 12:40
  • @Hardik Patadia The same answer is located at http://stackoverflow.com/questions/29166447/odoo-loading-javascript-files-in-version-8/29166734#29166734 – Kenly Aug 16 '16 at 12:44
  • @Hardik Patadia i work with liclipse to work on modules of odoo and when i downloaded this link https://code.jquery.com/jquery-3.1.0.min.js and edit its path in the xml file that you showed me it doesn't work in odoo whereas it works normally with browsers. what do you think ?? – IsLàm Nadih Aug 18 '16 at 10:49
  • have you got this file physically on your computer? or is it external link? – Hardik Patadia Aug 20 '16 at 09:41
  • it is an external link, from the official website. Actually i can't figure out where the problem is , and I'm wondering if the syntaxe is valid or not on odoo ! Could you give me please your email or your facebook account in order to communicate more fluently ? } – IsLàm Nadih Aug 22 '16 at 10:33