Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

ODOO : Howa to add css file to change the view xml

By
Drees Far
on 8/8/16, 7:46 AM 249 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

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

Jérémy Kersten (jke)
on 8/8/16, 3:13 PM
0
kirubanidhi
On 8/11/16, 2:03 AM

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'],
 }

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

3 follower(s)

Stats

Asked: 8/8/16, 7:46 AM
Seen: 249 times
Last updated: 8/11/16, 4:44 AM