We want to let clients sign in to our system and each see only the menu items, pages, and layout/theme that we have made for that particular client.
I've been following the theme tutorial here (http://odoo-80.readthedocs.org/en/latest/guides/themes.html) but I don't see how to choose the theme based on the user viewing the page. I'm still pretty new to Odoo. Any ideas?
Edit: I'm also trying to figure out how to apply a theme to specific areas (controllers or actions) of the odoo site. Any links to documentation or tutorials on this would be appreciated.
In regards to b) I believe what you are referring to is a multi-website type setup (similar to Magento's Website > Store > Store View architecture). Point b) is being worked on in version 9.0 (currently the master branch - runbot.odoo.com), however it is many months away from being released as a stable release. From what I understand version 9 will allow you to run multiple websites with different theme modules, different products, CMS pages, etc. from one database. Currently with Odoo 8.0 it is only really feasible to run one website with one set of CMS pages and products for the page.
While technically it is feasible to build some custom modules to achieve this type of functionality based on domain, etc. I think they would be hack methods/workarounds at best due to the fact the underlying architecture is not there to support it properly.
With that being said in regards to point a) you can certainly achieve what you want to do in regards to applying different user/user group access rights to certain CMS pages, reports, products, etc. by building your own module(s) to acheive the functionality.
I have achieved a few things with building a custom module to create some user-specific and user group specific functionality by liberally using the t-if and group access rights functionality in one of my custom theme modules that is being built for a client who sells airsoft products here:
This website allows for distributor-only features by applying different variations on the following statement:
t-if="not user_id.partner_id.name == 'Public user'"
for example showing an add to cart button for logged in users only you could use the following snippet:
<template id="product_add_to_cart_Custom" inherit_id="website_sale.product" name="Add To Quote - Logged In" customize_show="True">
<xpath expr="//a[@id='add_to_cart']" position="replace">
<a t-if="not user_id.partner_id.name == 'Public user'" id="add_to_cart" class="btn btn-primary btn-lg mt8 js_check_product a-submit" href="#"><i class="fa fa-angle-double-right"></i>&nbsp;&nbsp;&nbsp;Add to Quotation</a>
In regards to group access rights, I believe there are a number of posts in this forum about them. Martin Apitz seems to be quite knowledgeable about this kind of thing. You can see his original answer to my question here regarding setting up distributor-only pricing on the website here:
if you're interested in following the developments on Odoo 9.0 you can take a look at the runbots:
take a look at the master branch (9.0 under development) and you can login to any of these instances by using username: admin, password: admin. If you'd like to take a look at what is being worked on for Website > Store > Store View type architecture in 9.0 you can take a look under Settings >> Website Settings > localhost (click on the dropdown box and create new).
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
|Asked: 12/3/14, 1:43 PM|
|Seen: 849 times|
|Last updated: 3/16/15, 8:10 AM|