Menu

Помощь

0

How to achieve record-based access control in Odoo 14?

Avatar
Krishnakant Joshi

We have a requirement to add multiple user roles to an object in odoo.

Current requirement is with Partner Model. Odoo Partner Record can have multiple users assigned from organization with different roles. Based on the role individual can Create, Edit, Read or Delete the record.

For example:

Top Company is a record in odoo partner which has 3 users assigned.

  1. User 1 (Whos is Driver): Can Read this record. Cannot Edit or Delete
  2. User 2 (Who is Sales Person): Can Read this record. Can Edit. Cannot Delete
  3. User 3 (Who is Account Executive): Can Read this record. Can Edit. Can Delete

Can someone please guide how to achieve this in odoo 14 community edition.

Thanks in Advance.

Regards, KK

2 Комментарии
Аватар
Отменить
Avatar
Niyas Raphy
-

For the understanding of the odoo security mechanism, have a look at this: https://www.youtube.com/watch?v=mzg3EGD_6Gw

Avatar
Krishnakant Joshi
-

@Niyas Raphy -- Thanks for the link.

The problem arises when the same User has multiple roles.

For Example:

There is a User who is acting as "Original Owner" for a particular Record. The same user is "Handler" for another record. It means same user is part of multiple groups and acting differently on different records based on his role (his function with a particular record) assignment with a record.

1 Ответ
1
Avatar
Jainesh Shah(Aktiv Software)
Best Answer

Hey Krishnakant, 

You can achieve this by creating 3 different groups.

1. Driver : access_driver,access_driver,your_custom_object,group_driver,1,0,0,0

2. Sales Person : access_driver,access_driver,your_custom_object,group_salesperson,1,1,0,0

3. Account : access_account,access_account,your_custom_object,group_account,1,1,0,1

Thank you!

Regards,




Email:      odoo@aktivsoftware.com  

Skype: kalpeshmaheshwari

   

Аватар
Отменить