I have new group (Project Lead). This group need to Read others Project, and write his own project(ex: user1 is a manager in project001 and user2 is a manager in project002. We need user1 can edit project001 and he need to only read project002 not allowed to edit).
My below code did not work, Using the below code the all project changed into editable.
I have tried,
In XML
<record id="group_project_lead" model="res.groups">
<field name="name">Lead</field>
<field name="category_id" ref="base.module_category_project_management"/>
</record>
<record id="project_project_lead_rule1" model="ir.rule">
<field name="name">Project: Lead to view only others document</field>
<field name="model_id" ref="project.model_project_project"/>
<field name="groups" eval="[(4, ref('project_user_access.group_project_lead'))]"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_unlink" eval="False"/>
<field name="domain_force">[('user_id','!=',user.id)]</field>
</record>
<record id="project_project_lead_rule2" model="ir.rule">
<field name="name">Project: Lead to write own document</field>
<field name="model_id" ref="project.model_project_project"/>
<field name="groups" eval="[(4, ref('project_user_access.group_project_lead'))]"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="False"/>
<field name="perm_unlink" eval="False"/>
<field name="domain_force">[('user_id','=',user.id)]</field>
</record>
In CSV(Tried with CSV and also Without CSV)
access_project_project_group_lead,project_project_group_lead,project.model_project_project,project_user_access.group_project_lead,1,1,1,1