Odoo Help


15 Answers

Frédéric Gilson (fgi)

--Frédéric Gilson (fgi)--

| 6 6 11
Grand-Rosière, United States
--Frédéric Gilson (fgi)--
Frédéric Gilson (fgi)
4/30/14, 11:26 AM
  1. How to hide the "Shop" menu item? Go to Settings > Technical > Security > Record rules and create a new rule:

    • Object: Website Menu
    • Apply for Read access
    • Rule definition: [('url','not like','%/shop%')]
    • Group: Public
  2. How to make the eCommerce pages unreachable for people who are not registered as employees or portal users?

    • Open your shop and access the page HTML editor
    • Select the Product page
    • Add the following attribute in the first <t> tag (name="Products"): groups="base.group_user,base.group_portal"

Now you can open your website as an anonymous person. You do not retrieve the Shop menu and if you try to reach yourdatabasename/shop, you get an empty page.

DevBranch Company Limited, Luke Branch
7/11/14, 9:40 PM

Hi Frédéric, Thanks for your post. Could this be applied in a similar manner to the following elements on the frontend: Add to Cart Shopping Cart (in header) Sales Price Quantity (ie. - +) And items in the navigation menu that are only meant for wholesale clients. I asked a similar question here (https://www.odoo.com/forum/Help-1/question/How-To-Remove-Pricing-For-Not-Logged-In-Users-on-E-commerceWebsite-for-Distributor-Business-to-Business-Sales-52924), but still do not fully understand how the Qweb markup works. I'm looking to implement something similar to Denise. Product catalog (no prices or ecommerce functionality) for the casual visitor, while allowing our distributors to sign in and place orders using the shopping cart and changing the button add to cart to add to quote. I've found a module that seems to be under development for v8 here also: https://github.com/maxmumford/website_b2b i'll post back here with what I find in regards to how it is implemented.

Scott Hart
3/8/17, 7:01 AM

Is this option still viable in Odoo 10? I've looked and can't find the same structure.

DevBranch Company Limited, Luke Branch
3/9/17, 3:20 AM

Hi Scott,

This should still be fundamentally the same process in version 10.0, although the views may have been reshuffled a little.

What exactly would you like to achieve in v10.0?

3/11/17, 5:16 AM

How can I hide the product page itself, because it still showing in google search as follows www.yourdomain.com/shop/product/product_name

I tried to use this domain filter [('url','not like','%/shop/product/?\W+%')] but it didn't work.. can you help me please to write the right domain filter


Hilar AK

--Hilar AK--
| 6 6 11
--Hilar AK--



Experienced Odoo developer, Functional Consultant.

Hilar AK
3/13/17, 6:35 AM

Frédéric Gilson (fgi)On 4/30/14, 8:56 PM Answered the exact way through UI. But this will not be the correct way always. We can do that in our code like in the shop controller just check the thing whether has a user and only render the e-commerce template if request has a user.


    ], type='http', auth="public", website=True)
    def shop(self, page=0, category=None, search='', ppg=False, **post):
      if request.uid:
#only render the template with other operations
return request.website.render("website_sale.products", values)
return request.website.render("website_sale.error_page", {})

1 Comment
Agrista, Helmut Drewes
5/10/18, 4:35 AM

I get the following error (might be m< lack of knowledge on how to inherit controllers):

NameError: name 'values' is not defined

Also, is the "public" user also a valid user and will be able to see the products and product pages?

Heifara MATAPO
10/10/17, 8:39 PM

@Frédéric Gilson,

Excellent solution. Does not need any module installation.

Thank you

Johanna Löfvenberg
3/30/17, 8:28 AM

Hi Frédéric,

I followed your steps in the HTML editor but even users that are not signed in can still see the Webshop in the menu (although the page gets blank when they click the menu item). Do you have any idea why? I tried to delete the browser history and it didn't help.


Adam Moonen
9/9/15, 7:43 PM

Frédéric Gilson (fgi)   - Brilliant Answer, works every time.

Jonathan Hurtado
6/17/15, 4:25 PM


I followed the steps, and the user is no longer able to access to mysite.com/shop.

but... the public user can still access to my shop store via google (in google I see all the items that I have on the shop) and access to "add to cart" button.

To avoid this issue:

You need to install the "Warning Messages and Alerts" module; then you need to go to Sales -> Customers -> "Public User" -> Warnings -> Warning on the Sales Order -> Blocking Message.


Andrés Méndez
3/10/15, 6:54 PM

Hello Frédéric.

I have followed your steps, but I don't find "Rule definition" to enter that piece of code, instead I can see "Domain".

Do I have to enter it in the "Domain" field?


Denise van der Linden
7/11/14, 6:18 PM

@Luke as I cannot add a new comment or answer I'll answer to you by editing my previous answer. As far as I understand from you my wish cannot be accomplished in the SAAS version so I will not start a new post for now. In case I plan to install on VPS instead I might get back to you. Thx for your help so far.



I would like to use the webshop as a catalogue only to users who are not logged in showing public price. However only invited users (retailers) are allowed to logon and able to order at the (wholesale) pricelist assigned to them.

Therefore I'm looking for a way to only remove the "add to cart" button from the product overview and product page. Tried looking for a submit tag in the html where I could put groups="base.group_user,base.group_portal to see if this would only hide the cart button but couldn't find a spot to put it.

Anybody any suggestions?

Best regards,



DevBranch Company Limited, Luke Branch
11/19/14, 12:17 AM

@Denise, It seems that the comments are treating my code snippet as actual HTML instead of escaping it. Please create a new question thread in the forum with your question above and I will create an answer for it so as to conform with the guidelines of the forum properly.

Denise van der Linden
8/17/15, 8:56 PM

@Luke, no worries as I could still understand the post above. However I'm not on a local install and exploring ODOO SAAS for a couple of years now as I feel an easy to implement solution would be the way to go forward. ODOO 9 seems another great improvement again.

Ask a Question
Keep Informed
12 follower(s)
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