Skip to Content
Menu
This question has been flagged
1 Reply
629 Views

I'm in odoo 12.0, I created a new database with only the project module. 

Then I created a record rule with : 

Name = user : update own task only 

Access Rights : Apply for All 

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

Groups : Project / User 

Then I created a new internal user with only that group, and it can see all tasks. 

I wanted that users from the Project / User group can only see their own assisgned tasks.

Avatar
Discard
Author Best Answer

Because of this record rule :


<recordmodel="ir.rule"id="project.task_visibility_rule">            <fieldname="name">Project/Task: employees: follow required for follower-only projectsfield>            <fieldname="model_id"ref="project.model_project_task"/>            <fieldname="domain_force">[        '|',            ('project_id.privacy_visibility', '!=', 'followers'),            '|',                ('project_id.message_partner_ids', 'in', [user.partner_id.id]),                '|',                    ('message_partner_ids', 'in', [user.partner_id.id]),                    # to subscribe check access to the record, follower is not enough at creation                    ('user_id', '=', user.id)        ]field>            <fieldname="groups"eval="[(4,ref('base.group_user'))]"/>
record>
Avatar
Discard