跳至内容
菜单
此问题已终结
1 回复
2180 查看

In Odoo 17 I am working on the Project and Timesheets Module, I want to add permissions that a user is only able to view the Project /Task assigned to him/her and is not able to view the tasks that are assigned to other users, also the person that is assigned a task I also want to give him limited access like he cannot edit or delete or update his assigned task. So would I be able to achieve this? What are the specific record rules that I would add manually for my requirement as I am using Odoo Online

形象
丢弃
最佳答案

Hello Muhammad Zaeem Mohzar, 

    

    Here’s how you can set it up:

    

    1) Create Record Rules :

    

    For Tasks:


    Go to Settings > Technical > Security > Record Rules.

    

    Create a new record rule for the project.task model:


        Name: Tasks assigned to user

        Object: project.task

        Domain: [('user_id', '=', user.id)]

        Apply for: (select the relevant user group, e.g., Employees or a custom group)

        Perms Read: Checked

        Perms Write: Unchecked

        Perms Create: Unchecked

        Perms Unlink: Unchecked

        

        

    For Projects:


    Go to Settings > Technical > Security > Record Rules.

    

    Create a new record rule for the project.project model:


        Name: Projects assigned to user

        Object: project.project

        Domain: [('user_id', '=', user.id)]

        Apply for: (select the relevant user group, e.g., Employees or a custom group)

        Perms Read: Checked

        Perms Write: Unchecked

        Perms Create: Unchecked

        Perms Unlink: Unchecked

        

    2) Create Access Control Lists (ACLs)


    define what operations a user can perform on a particular model. 

    You can set up ACLs to restrict users from editing or deleting tasks.


    Go to Settings > Technical > Security > Access Control Lists.

    

    Create a new ACL for the project.task model:

    

        Name: Task - Read Only

        Object: project.task

        Group: (select the relevant user group, e.g., Employees or a custom group)

        Read Access: Checked

        Write Access: Unchecked

        Create Access: Unchecked

        Delete Access: Unchecked

    

    3) Assign Users to Groups


       Make sure the users are assigned to the correct groups that have the appropriate record rules and ACLs applied.


    Hope this helps.

    

    If you need any help in customization feel free to contact us.


Thanks & Regards,

Email:  odoo@aktivsoftware.com           

Skype: kalpeshmaheshwari 

形象
丢弃
相关帖文 回复 查看 活动
2
7月 24
1141
1
7月 24
1343
0
2月 24
1189
0
11月 24
1898
1
6月 23
3102