Odoo - OpenERP - How to restrict the access to the eCommerce menu or specific web page, link etc...?
I need to hide the Shop menu and the ecommerce content (product pages, etc) for all the anonymous website viewers.
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
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.
Comments & Notes:
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.
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!