I create some fields (res.users) and i need to change the record permissions based in this fields.
Is it possible? Thanks.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I create some fields (res.users) and i need to change the record permissions based in this fields.
Is it possible? Thanks.
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
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up