Odoo Help

2

how to remove a css/js file from a template

By
AKRAM M ALFUSAYAL
on 7/31/15, 12:24 PM 681 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--
2932
| 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>



About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

3 follower(s)

Stats

Asked: 7/31/15, 12:24 PM
Seen: 681 times
Last updated: 8/2/15, 4:07 AM