Skip to Content
Menu
This question has been flagged
1 Reply
3039 Views

I create some fields (res.users) and i need to change the record permissions based in this fields. 

 Is it possible? Thanks.

Avatar
Discard
Best Answer

You may create a security rule for that purpose.

Have a look for examples in the module sale: https://github.com/odoo/odoo/blob/13.0/addons/sale/security/sale_security.xml . There the rule 'Personal orders' regulates an access to sale orders based on the sales person field (user_id) and is applied to all users of the group group_sale_salesman).

You can generate also such rules through the interface: Settings > Technical > Security > Record Rules (developer mode should be turned on).

For more details have a look at the documentation: https://www.odoo.com/documentation/13.0/reference/security.html


Avatar
Discard