Support different theme per website
Website Multi Theme
Allow the website admin to set a different theme for each website.
To make this module work, you need to either:
- Install any of the officially supported themes:
- Install any of the unofficially supported themes (at your own risk):
Themes in the above lists will become multiwebsite when installed along this module. If they get installed after ``website_multi_theme``, update this module manually, or it will not be notified of such change.
To configure this module, you need to:
- Go to Website Admin > Configuration > Settings and choose or create
- a Website.
- Press Advanced > Multiwebsite theme > Reload.
- In Advanced > Multiwebsite theme, pick one of the available themes.
Once you save, any website that has no Multiwebsite theme selected will have, the default plain Bootstrap theme, and those that do have one will get it.
Of course, your Odoo instance must be reachable by all of the provided host names, or nobody will ever see the effect. But that is most likely configured through your DNS provider and/or proxy, so it is not a matter of this addon.
If you want to test this behavior, think that localhost and 127.0.0.1 are different host names.
To use this module, you need to:
- Follow the configuration steps.
- Enter any of the websites you modified.
How to develop a multiwebsite-ready theme?
Check demo/themes.xml. It includes a demo theme that will serve as a template for you. This demo theme turns primary buttons green, so you can test if it is applied or not easily.
How to convert a single-website theme in a multi-website one?
Check data/themes_bootswatch.xml. You must do that. You can consider adding the support directly in this addon, given it will just do nothing if the single-website theme addon is not installed (it acts as a soft dependency).
How to get multiwebsite-specific views updated?
This addon is conservative by default, meaning that in production databases views will not be updated if they already were created (except for the ones copied from templates/patterns.xml).
To force your website getting updated views for all views from a base theme that has changed, you should disable the website multi theme (to make the engine remove all views) and then re-enable it again (to recreate them from scratch).
This does not happen in demo or development instances, where views arch is always updated.
Known issues / Roadmap
- Private themes support is not guaranteed.
- There is no UI to remove websites. Do it through an odoo shell.
- Theme picker should include some kind of thumbnail if possible.
- If you install any of the supported themes after installing this addon, you will have to press Reload in the website config wizard to make it notice the change. The same is true when you install any module with customize_show="True"
- If you install any unsupported theme along with this addon, it would possibly become the base for all those supported, which can easily lead to weird situations and errors.
- This addon will not work if your Odoo is not patched. Make sure it is updated before installing. It must include these commits:
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
To contribute to this module, please visit https://odoo-community.org.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size odoo10_addon_website_multi_theme-10.0.1.2.0-py2-none-any.whl (43.3 kB)||File type Wheel||Python version py2||Upload date||Hashes View|
Hashes for odoo10_addon_website_multi_theme-10.0.1.2.0-py2-none-any.whl