[REV] crm: allow a user assigned to activity to see lead

This reverts commit ab65a02f5a.

Before that commit "Sales / User: Own Documents Only" had access to
self-assigned or without salesperson assigned leads.

With the change, user of this group were meant to also have access to
leads with an activity to which they were assigned to.

But:

- this is a different behavior from activities on other models.

- there is a technical disability that in some case prevent to have
  fully functionning access rules if based on one2many with
  auto_join=True (we will try to fix this in master).

opw-816246
closes #23085
This commit is contained in:
Nicolas Lempereur
2018-02-15 13:38:40 +01:00
parent 6899bb829a
commit 4e061d8c51
-10
View File
@@ -27,16 +27,6 @@
<field name="domain_force">['|',('user_id','=',user.id),('user_id','=',False)]</field>
<field name="groups" eval="[(4, ref('sales_team.group_sale_salesman'))]"/>
</record>
<record id="crm_rule_lead_assigned_activities" model="ir.rule">
<field name="name">Leads with assigned activities</field>
<field ref="model_crm_lead" name="model_id"/>
<field name="domain_force">[('activity_ids.user_id','=',user.id)]</field>
<field name="groups" eval="[(4, ref('sales_team.group_sale_salesman'))]"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_unlink" eval="False"/>
</record>
<record id="crm_rule_all_lead" model="ir.rule">
<field name="name">All Leads</field>
<field ref="model_crm_lead" name="model_id"/>