Skip to main content

Support different theme per website

Project description

License: LGPL-3

Website Multi Theme

Allow the website admin to set a different theme for each website.

Installation

To make this module work, you need to either:

  • Install any of the officially supported themes:

    • theme_bootswatch

  • Install any of the unofficially supported themes (at your own risk):

    • theme_anelusia

    • theme_artists

    • theme_avantgarde

    • theme_beauty

    • theme_bewise

    • theme_bistro

    • theme_bookstore

    • theme_clean

    • theme_enark

    • theme_graphene

    • theme_kea

    • theme_loftspace

    • theme_mongolia

    • theme_nano

    • theme_notes

    • theme_odoo_experts

    • theme_orchid

    • theme_treehouse

    • theme_vehicle

    • theme_yes

    • theme_zap

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.

Configuration

To configure this module, you need to:

  1. Go to Website Admin > Configuration > Settings and choose or create

    a Website.

  2. Press Advanced > Multiwebsite theme > Reload.

  3. 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.

Usage

To use this module, you need to:

  1. Follow the configuration steps.

  2. Enter any of the websites you modified.

Try me on Runbot

Development FAQ

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

Credits

Contributors

Maintainer

Odoo Community Association

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file odoo10_addon_website_multi_theme-10.0.1.0.4.99.dev1-py2-none-any.whl.

File metadata

File hashes

Hashes for odoo10_addon_website_multi_theme-10.0.1.0.4.99.dev1-py2-none-any.whl
Algorithm Hash digest
SHA256 99c4defd499107c95a353a1710d024b5c2db48315658664e7077722c837e42f4
MD5 17e41cf23c7eb5e86fbc86aa3c385205
BLAKE2b-256 b9584930dc1d7ab0e5f160e27d1d3cd61468bf39bd7ba8b22875ebb1a07c7078

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page