Odoo Help


How to add one class into button

Đặng Danh Thông
on 11/2/15, 7:11 PM 1,573 views


I want to add external css file into odoo v8. My css change style of button. 

How to change:

<button type="button" class="oe_button oe_form_button oe_highlight">...</button>


<button type="button" class="oe_button oe_form_button oe_highlight new_class">...</button>

Impossible if i want to add class into all button of odoo



Akhil P Sivan

--Akhil P Sivan--

| 5 4 7
Kochi, India
--Akhil P Sivan--

Interested in exploring Odoo both technically & functionality wise.

email-id : akhilpsivan01@gmail.com

Akhil P Sivan
On 11/3/15, 1:29 AM


You can create your custom css file under:

your_module >> static >> src >> css >>my_css.css

You can then define your class in the my_css.css file. For eg:

.openerp .your_custom_button {
font-weight: normal;
width: 132px !important;
height: 40px;
color: #666;
margin: 0px -1px -1px 0px;
padding: 0;
border: 1px solid #dddddd;
border-radius: 0;
box-shadow: none;
background: white;

To include your css file, add the following in templates.xml file.

<template id="assets_backend" name="test_module assets" inherit_id="web.assets_backend">

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

<link rel="stylesheet" href="/test_module/static/src/css/my_css.css"/>



Then you can use class ="your_custom_class" attribute in your button definition in xml file.

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.


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

1 follower(s)


Asked: 11/2/15, 7:11 PM
Seen: 1573 times
Last updated: 11/3/15, 1:29 AM