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

Heello everybody!!

Need an answer please.

Why doesnt it change anything when i add a css file and call it like this in the xml file:

   <link rel="stylesheet" href="/module_namel/static/src/css/file_name.css" />

Help pleaase

Ảnh đại diện
Huỷ bỏ

need to be added in an asset. and update the module to refresh the view.

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

Hi, below this code is helpful for you.

#view file:

<template id="my_assets_id" name="website assets for my module" inherit_id="website.theme">        <xpath expr="." position="inside">        <link rel="stylesheet" href="/website_my_module/static/src/css/my.css"/>        </xpath>    </template>

# __openerp__.py
 {
     'name': "CSS Example",
     'description': "new css example",
     'category': 'Generic Modules/Others',
     'depends': ['web'],
     'data': [],
     'css': ['static/src/css/my_css.css'],
 }
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 12 20
6208
2
thg 5 20
7385
0
thg 6 18
5624
0
thg 9 17
4666
0
thg 7 15
6393