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

how to include and use css in a module using odoo 9.0

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

To use css in odoo create a folder static->src->css-> then create file_name.css.

and in the xml,

<?xml version="1.0" encoding="utf-8"?>
<openerp>
 <data>
     <template id="assets_backend" name="project assets" inherit_id="web.assets_backend">
            <xpath expr="." position="inside">
                 <link rel="stylesheet" href="/field_highlight/static/src/css/field_name.css"/>
</xpath>
 </template>
 </data>
</openerp>
อวตาร
ละทิ้ง

can you pls update it for Odoo 16, sir?

What about Odoo 16?

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



If your css file is for website, inherit   web.assets_frontend. or inherit web.assets_backend

<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 on Youtube.

     https://www.youtube.com/ how to add css file to odoo 10

All the best ! 



อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
5
พ.ย. 24
46969
1
เม.ย. 20
10084
1
ก.ค. 24
2014
1
ก.ค. 24
2036
0
ก.ย. 23
1938