I want the users of the groups group_project_user in the module project to just see these own tasks
here is my code that I do but it does not work, user sees all the tasks
I declared my file in manifest
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I want the users of the groups group_project_user in the module project to just see these own tasks
here is my code that I do but it does not work, user sees all the tasks
You can inactive that rule using below code instead of removing it.
<record id="project.task_visibility_rule" model="ir.rule">
<field name="active" eval="False"/>
</record>
after a search I must to delete this record rules which is by default in list of record rules
<record model="ir.rule" id="task_visibility_rule">
<field name="name">Project/Task: employees: follow required for follower-only projects</field>
<field name="model_id" ref="model_project_task"/>
<field name="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>
<field name="groups" eval="[(4,ref('base.group_user'))]"/>
</record>
how to remove this record rules ??
try to add this two lines into your code
<data noupdate="1">
</data >
like this
<odoo>
<data noupdate="1">
<record model="ir.rule" id="project_rules_tasks">
<field name="name">Projet rules taches user</field>
<field name="model_id" ref="model_project_task"></field>
<field name="groups" eval="[(4,ref('project.group_project_user'))]"></field>
<field name="domain_force">[('user_id','=',user.id)]</field>
</record>
</data >
</odoo>
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up