Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
19335 มุมมอง

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 !!

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.

คำตอบที่ดีที่สุด


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>

You can watch this on YouTube

Thanks


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ก.ค. 24
1159
1
ก.ค. 24
1235
1
ธ.ค. 22
2022
1
มี.ค. 15
3579
0
มี.ค. 15
3614