콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
4 답글
4351 화면

Hello,

Is there way to restrict product permission to each user? I would like to give the product permission to user but don't want to access all products. We want user to see only products that we allowed.

Please help me how to restrict this permission.

Thanks

아바타
취소
베스트 답변

Hello!



To restrict product access to specific users in Odoo, you'll need to leverage Odoo's security groups and record rules. Here’s how you can achieve this:


  Create a New Security Group:

    Go to Settings > Users & Companies > Groups.

    Create a new group (e.g., "Limited Product Access").

    Assign the users who should have limited product access to this group.

  Define a Record Rule:

    Go to Settings > Technical > Record Rules (you may need to activate developer mode).

    Create a new record rule for the 'Product' model ('product.template' or 'product.product').

    Set the domain filter to specify which products the users in the new group can access (e.g., ['|', ('responsible_id', '=', user.id), ('categ_id', '=', user.category_id.id)]).

    Apply this rule to the "Limited Product Access" group.

  Adjust Access Rights:

    Ensure that the users in the "Limited Product Access" group do not have broader access rights that would override the record rule.


For personalized assistance:
https://www.pragtech.co.in/contact-us-mql.html

아바타
취소
베스트 답변

Hi,


Yes, you can restrict users to only see specific products in Odoo 15 by using a custom field and record rule:


    Add a Many2many field (e.g. allowed_user_ids) on the product.template or product.product model to assign which users can access each product.

    allowed_user_ids = fields.Many2many('res.users', string='Allowed Users')


    Create a record rule with the following domain:


    ['|', ('allowed_user_ids', 'in', [user.id]), ('allowed_user_ids', '=', False)]


    This ensures users only see products they are explicitly allowed to view, or products with no restriction.


    (Optional) Assign the rule to a specific user group if you only want to apply it to certain users.


With this setup, users will only see products where they are listed in the "Allowed Users" field.


Also you can refer below custom odoo module ,


https://apps.odoo.com/apps/modules/18.0/ace_user_specific_product_allocation


Hope it helps

아바타
취소
베스트 답변

Yes, you can control product each user using bellow odoo modules 

Visit Link: https://apps.odoo.com/apps/modules/18.0/ace_user_specific_product_allocation



아바타
취소
베스트 답변

You can add a field to product model like:
user_ids = fields.Many2many('res.users', 'Users Have Access')

the override read the tree and the form read domains based on users who have access to the product.

아바타
취소
관련 게시물 답글 화면 활동
1
9월 22
3666
3
8월 24
6451
3
8월 23
4394
1
10월 22
3822
2
8월 22
2881