Skip to Content
Menu
This question has been flagged
1 Reply
260 Views

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
Discard
Best Answer

Go to Website > Customize > HTML/CSS Editor

  1. Open your website in edit mode
  2. Click the "Edit HTML/CSS" button
  3. Locate the relevant QWeb template (example: website_sale.product or website_sale.products_item)
    Wrap Price Display in a QWeb Condition

​In the product snippet (t-foreach or product_price section), find the <span> that shows the price.Wrap it like this:
<t t-if="request.env.user.has_group('base.group_user') or request.env.user.has_group('base.group_portal')">

    <span t-field="product.product_tmpl_id.lst_price"/>

</t>

This ensures that only portal or internal users see the price.

Avatar
Discard
Author

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

Related Posts Replies Views Activity
2
May 25
155
0
Apr 25
227
1
Apr 25
446
0
Feb 25
369
1
Jan 25
531