Se rendre au contenu
Menu
Cette question a été signalée
2 Réponses
9228 Vues

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
Ignorer

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

Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
0
déc. 20
6285
2
mai 20
7453
0
juin 18
5672
0
sept. 17
4723
0
juil. 15
6448