Skip to content

Commit e3044b5

Browse files
lav-adhocmatiasperalta1
authored andcommitted
[MIG] sales_team_security_crm: Migration to 18.0
1 parent 5cec64d commit e3044b5

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

sales_team_security_crm/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{
55
"name": "CRM documents permissions by teams",
66
"summary": "Integrates sales_team_security with crm",
7-
"version": "17.0.1.0.0",
7+
"version": "18.0.1.0.0",
88
"category": "Customer Relationship Management",
99
"website": "https://github.com/OCA/sale-workflow",
1010
"author": "Tecnativa, Iván Todorovich, Odoo Community Association (OCA)",

sales_team_security_crm/security/security.xml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
<field name="model_id" ref="crm.model_crm_lead" />
66
<field
77
name="domain_force"
8-
>['|', '|', ('user_id', '=', user.id), ('user_id', '=', False), '|', ('team_id', '=', user.sale_team_id.id),
9-
('team_id', '=', False)]
8+
>['|', ('user_id', 'in', [user.id, False]), ('team_id', 'in', user.crm_team_ids.ids + [False])]
109
</field>
1110
<field
1211
name="groups"
@@ -18,8 +17,7 @@
1817
<field name="model_id" ref="crm.model_crm_activity_report" />
1918
<field
2019
name="domain_force"
21-
>['|', '|', ('user_id', '=', user.id), ('user_id', '=', False), '|', ('team_id', '=', user.sale_team_id.id),
22-
('team_id', '=', False)]
20+
>['|', ('user_id', 'in', [user.id, False]), ('team_id', 'in', user.crm_team_ids.ids + [False])]
2321
</field>
2422
<field
2523
name="groups"
@@ -29,7 +27,7 @@
2927
<record id="sales_team_team_rule" model="ir.rule">
3028
<field name="name">Own Sale Teams</field>
3129
<field name="model_id" ref="sales_team.model_crm_team" />
32-
<field name="domain_force">[('id', '=', user.sale_team_id.id)]</field>
30+
<field name="domain_force">[('id', 'in', user.crm_team_ids.ids)]</field>
3331
<field
3432
name="groups"
3533
eval="[(4, ref('sales_team_security.group_sale_team_manager'))]"

0 commit comments

Comments
 (0)