Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to add css file in module? [SOLVED]

css
By
M Belatrous
on 11/30/16, 5:01 AM 145 views

Hi everyone,

I'm working on Odoo V8 and I've just finished developping my first module. It's working fine, but it doesn't display any CSS, though I've added a style sheet to the css folder.

I've also declared it in the __openerp__ file like this 'css':['static/src/css/sheet.css'], so I dont understand why it doesn't work.

Thank you in advance for your answers !

It's working, thank you !!

M Belatrous
on 11/30/16, 8:11 AM

Please read the forum rules. Instead of posting your thanks as a new answer, you'd rather upvote shameem's answer and check it as answered.

Ermin Trevisan
on 11/30/16, 8:15 AM
1
shameem@aχoncoms
On 11/30/16, 6:08 AM


Add through xml

 

<!--For Backend-->
<template id="assets_backend" inherit_id="web.assets_backend"> 
     <xpath expr="." position="inside">
         <link rel="stylesheet" href="/your_module/static/src/css/sheet.css"/> 
     </xpath>       
</template>
<!--For Frontkend-->
<template id="assets_frontend" inherit_id="web.assets_frontend">
      <xpath expr="." position="inside">
         <link rel="stylesheet" href="/your_module/static/src/css/sheet.css"/>
     </xpath>
</template>



Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 11/30/16, 5:01 AM
Seen: 145 times
Last updated: 12/2/16, 1:10 AM