Skip to Content
Menu
This question has been flagged
2 Replies
8406 Views

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

Avatar
Discard

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

Best Answer

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'],
 }
Avatar
Discard
Related Posts Replies Views Activity
0
Dec 20
4286
2
May 20
6307
0
Jun 18
4501
0
Sep 17
3545
0
Jul 15
5012