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.

2

how to remove a css/js file from a template

By
AKRAM M ALFUSAYAL
on 7/31/15, 12:24 PM 489 views

Adding a css/js file is easy in a template. Is there a way to remove css files. I am making a user preference that requires adding css if the option is true, but what if I want to remove that css file when the option is false.

This is how to add:

<xpath expr="//html/head/t" position="after">
<link t-if="option == true" href="option.css" rel="stylesheet"/>
</xpath>



2

Temur

--Temur--
2894
| 6 5 7
Tbilisi, Georgia
--Temur--
Programmer
Temur
On 7/31/15, 12:48 PM

try:

<xpath expr="//html/head/link[@href='option.css']" position="replace">
</xpath>



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: 7/31/15, 12:24 PM
Seen: 489 times
Last updated: 8/2/15, 4:07 AM