Skip to Content
Menu
This question has been flagged
1 Reply
4534 Views

I am using Odoo 13. I would like to change the background colour from purple to blue from a slide. website_slides is located in /src/odoo/addons/website_slides. I can't directly change /src/odoo/addons/website_slides/static/src/scss/website_slides.scss


I would like to override the following


.o_wslides_gradient {

    background-image: linear-gradient(120deg, #875A7B, darken(#875A7B, 10%));

}

This is my first time using Odoo. I would like to change the colour so that it is always blue instead of changing it per slide I use. How would I write a custom module and add it to /src/user?

Avatar
Discard
Best Answer

Hello Neil,


If you want to override any Style in the css (or class) you can create a custom Module and inside that you can create a new folder like (static/src/css/) and create a new file style.css.


Copy the same class name but you can define the property different (for e.g in your case) ".o_wslides_gradient {

    background-image: linear-gradient(120deg, #244c6d, #244c6d) !important;

}". 


You have to include your css file in qweb template 


    <template id="assets_frontend" inherit_id="website.assets_frontend">

        <xpath expr="." position="inside">

            <link rel="stylesheet" type="text/css" href="/module_name/static/src/css/style.css" />

         

        </xpath>

    </template>


You need to include the template in Manifest File and just install your Custom Module


Your Css Properties will be Applied

Regards,




Email:      odoo@aktivsoftware.com  

Skype: kalpeshmaheshwari

   

Avatar
Discard