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.

1

Can we create theme for backend ?

By
Olivier Andrade
on 11/12/14, 4:57 AM 4,697 views

Often, customers ask for other colors, icons, menu styles and so on... Is it possible in Odoo, to create and select graphical theme for the backend as for the frontend (website) ? I mean, have two differents themes for each side and not the default one...

If the answer is yes, could you please drive me to the documentation part where it is explained or show me an example ?

2

Leonardo Donelli

--Leonardo Donelli--
1040
| 5 4 8
Cave, Italy
--Leonardo Donelli--

Physics student and part-time developer.

Leonardo Donelli
On 11/12/14, 11:48 AM

Yes it's possible but far from easy. And there is no documentation about it. Basically you have to modify the static files of the web modules. The Odoo client is just a webapp.

2
Will Stott
On 11/12/14, 12:07 PM

As Leonardo said, it's possible. But basically because anything is possible when you have the source code, rather than it being a considered feature.

Tips:

  1. Get useful information from the styles in your browser by enabling debug mode by changing the URL in your browser: 
    • not: .../web#vie..... etc
    • yes: .../web?debug=#vie... etc
    • This will prevent odoo from minifying the css files and you can see the name of the css files and browse them as they are in the source code.
  2. If you right click and inspect element (chrome or firefox are good for this) you can see the css styles of a DOM Element in your Odoo pages.
  3. Override the css using a custom module: I've never tried this, one of the below ought to work though.
    • You could create a module and ensure that your css files are loaded later than Odoo's and that will override any styles you define, but wont neccessarily remove all odoo formatting (might be more desireable). I expect this would cause an odd lag as each css files is loaded in-turn during debug mode. But normal mode when the css is minified, it shouldn't be noticeable.
    • You could try to find the xpath which includes the .css files inside a .xml document. Then in your own module use an xpath to replace the .css file includes (I don't have an example of this because I'm bad with xpaths, but they seem to be pretty powerful so it should be possible.). This might provide complete override of any css file which might be desireable (but would be harder to get right).
    • I would avoid trying to replace any actual source files.
  4. As for changing the css files you're on your own. It would be nice if you could document your findings somewhere. This is something I might try and do in the future as well.

As I said at the start this isn't really an Odoo feature so there's no garauntee the css class names will stay the same over the course of new releases.  Which means you'll have to come up with some extensive test and/or really pay attention to commits which effect css files defined by Odoo. If their files don't change your files shouldn't need to either.

1
IT Libertas
On 3/24/16, 12:58 PM

With this module - https://apps.odoo.com/apps/modules/8.0/colors_customization/ - it is much simplier to change user interface important styles and apply it to each user individually

0

Parikshit

--Parikshit--
939
| 6 3 8
Ahmedabad, India
--Parikshit--

Working as an OpenERP/Odoo developer both experience in web and addons. you can contact me at:

E-mail : parikshitvaghasiya@gmail.com

Blog : parikshitvaghasiya.blogspot.in

Stackoverflow : http://stackoverflow.com/users/5089106/parikshit-vaghasiya

Parikshit
On 12/9/15, 11:59 PM

hello,

see the link:

https://apps.openerp.com/apps/themes/8.0/theme/

Hope this will help you.

0
Olivier Andrade
On 11/12/14, 12:47 PM

Ok, so it's not easy but possible. As it's not a feature i need to pay attention to the modification of css files by the Odoo developers team. But i think it can be interesting for our customers so i will give a try. I will keep you informed about the results. My intention is to create new theme with statics css files and perhaps try to have some theme selector feature... but no real roadmap at this moment...

Thank's Will for your tips. I will use them for sure.

@Olivier, I'd be very interested to see what you come up with. I've been playing around with some basic customisations over the past few months and have not yet run into any compatibility issues. I'll be putting together a boilerplate frontend theme module on github soon. If I can find time I may work on a basic boilerplate theme module for the backend as well.

Luke Branch
on 11/13/14, 10:58 PM

Hi Olivier, can you share your thoughts on this matter? I will go deep in this mission soon and I would like to hear from your findings. Thanks in advance!

Mateo Tibaquira
on 12/10/15, 5:14 AM
0
Juan José Scarafía
On 11/14/14, 8:32 AM

Hi Oliver,

Maybe this information will be useful for you:

http://odoo-magento-connector.com/guides/tutorial_customize.html#sections

Regards,

Juan José - Ing ADHOC

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

4 follower(s)

Stats

Asked: 11/12/14, 4:57 AM
Seen: 4697 times
Last updated: 3/24/16, 12:58 PM