Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ

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

Ảnh đại diện
Huỷ bỏ

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

Tác giả

@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.

Câu trả lời hay nhất

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

   

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
6
thg 11 19
62879
2
thg 1 24
2394
2
thg 7 23
1849
3
thg 8 25
169