Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
1029 Vizualizări

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.

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Autor

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

Related Posts Răspunsuri Vizualizări Activitate
2
iul. 25
541
2
iun. 25
1059
2
mai 25
641
0
apr. 25
662
1
apr. 25
836