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

I need my own customized view for my model. i tried to use the html tags in view file. for common customization i want to write the css file then will call the css class to my odoo view file. i wrote the css file under new folder. i want to know how to call the css or how to link the css in my view file.

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

Hi,

Please refer this

https://www.odoo.com/forum/help-1/including-css-file-to-odoo-115854

 

Muhammed Ali M - iWesabe

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

Create one static module in your module ,inside the static create css folder,and inside css create css file.

example:

/* css code for sale order form footer */
.footer_label{
padding-right:0px;
white-space: nowrap;
}

.footer_label > label:after{
content: ": "
}

And now you create one xml file inside views,in that xml file create code like this,

ex:

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
    <data>
        <template id="assets_backend" name="sale_order_footer assets" inherit_id="web.assets_backend">
            <xpath expr="." position="inside">
                <link rel="stylesheet" href="/module _name/static/src/css/sale_order_footer.css"/>
            </xpath>
        </template>

</data>

</odoo>
       
Thats SOLVE, Now YOU CHECK NEW CHANGES

Ảnh đại diện
Huỷ bỏ
Tác giả

it is working fine but how can i override existing class i.e design

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 4 24
1082
0
thg 8 16
3512
0
thg 3 25
628
2
thg 4 24
6750
5
thg 8 24
46175