Skip to Content
Menu
This question has been flagged

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
Discard

Hello Anna,

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

Best Answer

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
Discard
Related Posts Replies Views Activity
1
Aug 18
2970
0
Apr 25
1324
1
May 24
4251
1
Apr 24
2736
0
Apr 24
1975