Skip to Content
Menu
This question has been flagged
2 Replies
630 Views

Hi All 


We are starting up in odoo V18. We have the website ecommerce. But we are encountering some challenges. 


We would like the ability to only show variants filter when in a categori. Secondly only for variant for products in that categori. 

Let say we have lightbulbs in different colors. variant "Color" attribute "Red" "Blue" "Green" But in the categori there are no blue light. Then in the filter blue should not be shown. 

Is this possible with a module or other way ?

Avatar
Discard
Author Best Answer

Hi Ritik

Thanks for the reply.

Yes we are trying to add a custom filter. Inside the categories on the website. 
Let me try my best to explain.

On the website we have different website categories for the customer to browse though. With standard Odoo we can activate filter variant. But this leaves alot of options for things that are not part of the products in that categori. This is very confusing for the user.

So we need a modul that can see the product variants and attributes that is in that websitecategori. And only show these options to the costumer. 

I hope this makes sense to you.

Other Question i have.

  1. Are you also developing modules ? 
  2. If yes what would be a price range of developing a modul for this type of request ?


I have set up a meeting so you can disregard this.





Avatar
Discard
Best Answer

If you're trying to filter products by category in a custom view or search:

1. Using Domain Filters (XML or Python):

You can use the categ_id field (which links to the product category):

xml

CopyEdit

<filter name="filter_category" string="My Category" domain="[('categ_id.name','=','Your Category Name')]" />

This adds a custom filter for a specific category name.

2. In Odoo UI (Search Bar):

  • Go to Products → Search → Add Custom Filter
  • Choose Category → is equal to → Your desired category

3. Using Studio (If Enabled):

If you're on Odoo Online and using Studio:

  • Open your view in Studio
  • Add a new filter with the domain:
    categ_id.name = Your Category Name

If you're building a module or customizing, ensure categ_id is correctly referenced, and category names match.

@Ritik — Just a friendly reminder: the Odoo forum is meant for open community help and knowledge sharing. Please avoid promoting your company or services here. Let’s keep the space focused on solving problems and supporting each other. Thanks!

Avatar
Discard

@Ritik — Just a friendly reminder: the Odoo forum is meant for open community help and knowledge sharing. Please avoid promoting your company or services here. Let’s keep the space focused on solving problems and supporting each other. Thanks!