Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
9081 Vistas

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
Descartar

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

Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
0
dic 20
5933
2
may 20
7194
0
jun 18
5480
0
sept 17
4472
0
jul 15
6071