From 5825dd1479d97056abd5e727d2da13a3e0709aff Mon Sep 17 00:00:00 2001 From: Franco Leyes Date: Thu, 9 Jan 2025 09:02:46 -0300 Subject: [PATCH] [MIG] sales_team_security_crm: Migration to 17.0 --- sales_team_security_crm/__manifest__.py | 2 +- sales_team_security_crm/security/security.xml | 8 +++----- .../tests/test_sales_team_security_crm.py | 8 ++++++++ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/sales_team_security_crm/__manifest__.py b/sales_team_security_crm/__manifest__.py index 1a88ce88c13..2c29b975ac9 100644 --- a/sales_team_security_crm/__manifest__.py +++ b/sales_team_security_crm/__manifest__.py @@ -4,7 +4,7 @@ { "name": "CRM documents permissions by teams", "summary": "Integrates sales_team_security with crm", - "version": "16.0.1.0.0", + "version": "17.0.1.0.0", "category": "Customer Relationship Management", "website": "https://github.com/OCA/sale-workflow", "author": "Tecnativa, Iván Todorovich, Odoo Community Association (OCA)", diff --git a/sales_team_security_crm/security/security.xml b/sales_team_security_crm/security/security.xml index 57c6d7b0d2f..abfb20e75c4 100644 --- a/sales_team_security_crm/security/security.xml +++ b/sales_team_security_crm/security/security.xml @@ -5,8 +5,7 @@ ['|', '|', ('user_id', '=', user.id), ('user_id', '=', False), '|', ('team_id', '=', user.sale_team_id.id), - ('team_id', '=', False)] + >['|', ('user_id', 'in', [user.id, False]), ('team_id', 'in', user.crm_team_ids.ids + [False])] ['|', '|', ('user_id', '=', user.id), ('user_id', '=', False), '|', ('team_id', '=', user.sale_team_id.id), - ('team_id', '=', False)] + >['|', ('user_id', 'in', [user.id, False]), ('team_id', 'in', user.crm_team_ids.ids + [False])] Own Sale Teams - [('id', '=', user.sale_team_id.id)] + [('id', 'in', user.crm_team_ids.ids)]