Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
294 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Penulis

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

Post Terkait Replies Tampilan Aktivitas
2
Mei 25
179
0
Apr 25
250
1
Apr 25
478
0
Feb 25
387
1
Jan 25
547