Ir al contenido
Menú
Se marcó esta pregunta

Hi everyone,

I am working on an Odoo Online setup where I need to restrict which products are visible to portal users, depending on the services they have purchased.

Example:

  • Customer 1 buys the product A​. After that, in their portal, they should only see and be able to purchase product B and C.
  • Customer 2 buys the product B. In their portal, they should only see and be able to purchase product D and E.

So essentially, I want to assign products (or categories of products) to specific customers or customer groups, and make sure that only those products are visible and purchasable for them in the portal.

Has anyone implemented something similar or knows the best approach in Odoo Online (e.g. via user groups, access rights, product visibility rules, or custom development)?

Thanks in advance!

Avatar
Descartar

Hello Anna,

It is possible using  Studio but for more control you need to move on odoo.sh or on-premise.

Mejor respuesta

Hi,


In Odoo Online, restricting portal users to see only specific products based on their purchases is challenging because all portal users belong to the same group, so standard access rights cannot differentiate individual customers. One approach is to create a many2many field on res.partner called allowed_product_ids or allowed_category_ids, then filter the products displayed on the portal or website shop page based on this field.


Alternatively, if the portal uses Website Sale, you can implement product visibility rules by checking a customer’s purchased products and mapping them to the products they are allowed to see next. Custom development or Odoo Studio can provide more control, allowing you to override portal product queries and enforce server-side validation to prevent unauthorized purchases. Overall, maintaining a customer-product mapping and filtering products in the portal is the recommended approach for Odoo Online.


Hope it helps

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
ago 18
2970
0
abr 25
1329
1
may 24
4270
1
abr 24
2742
0
abr 24
1979