In Odoo, record rules and access rights are used to control user access to data in the system. Both are used to restrict user access to specific records, but they work differently.
Record Rules:
Record rules are used to filter records based on certain conditions. Record rules allow you to define filters that determine which records a user can see and/or modify. For example, you can create a record rule that allows a user to only see their own records or records related to their department. You can also use record rules to hide records from certain users or groups.
Access Rights:
Access rights, on the other hand, are used to control what actions a user can perform on a particular record. For example, you can use access rights to restrict a user from deleting a record or to allow a user to edit certain fields in a record. Access rights can be set at the model level or the field level, and they can be set for individual users or groups of users.
The key difference between record rules and access rights is that record rules are used to control which records a user can see and/or modify, while access rights control what actions a user can perform on a particular record.
To summarize, record rules are used to filter records based on certain conditions, while access rights are used to control what actions a user can perform on a particular record.