Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
397 Prikazi

We are currently using Odoo 18.2 Online, or SaaS.


I know there are a lot of ready-made modules out there, but they are for the community version only.


I tried searching online, but I only saw this answer by Ray Carnes. The answer was for an old version of Odoo, and it is not working with the latest versions. 


Currently, I'm still trying to find a workaround in views, but I am having a hard time with inheriting these classes and tables:





Also having trouble finding the view and hiding the price of this.


I just want to hide the prices in guest or public viewing, that's all. Using the Prevent Sale of Zero Priced Product is not an option for us.

Avatar
Opusti
Best Answer

Short & Working Solution (SaaS-compatible):
You can use custom CSS + user group class detection. Odoo adds o_connected_user class to the <body> tag when a user is logged in.

So you can hide prices only for guests (public users) with this CSS:
/* Hides prices ONLY for guest users (not logged in) */

body:not(.o_connected_user) .oe_price,

body:not(.o_connected_user) .product_price,

body:not(.o_connected_user) span[itemprop="price"],

body:not(.o_connected_user) .cart_total,

body:not(.o_connected_user) .text-right {

    display: none !important;

}

How to Apply It:
  1. Go to your Website > Click Edit (top right).
  2. Click the HTML/CSS editor (or “HTML Snippet” > “Custom Code”).
  3. Paste the CSS above.
  4. Save and publish.


i hope you will understand and it is helpfull

Avatar
Opusti
Avtor

Sorry. Your answer is too vague. Please clarify or expound it properly.

Related Posts Odgovori Prikazi Aktivnost
2
jun. 25
576
2
maj 25
273
0
apr. 25
322
1
apr. 25
530
0
feb. 25
439