Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
17225 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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>
Ảnh đại diện
Huỷ bỏ

can you pls update it for Odoo 16, sir?

What about Odoo 16?

Câu trả lời hay nhất



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 ! 



Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
5
thg 11 24
46882
1
thg 4 20
10028
1
thg 7 24
1957
1
thg 7 24
1976
0
thg 9 23
1898