From ac94537b47f767f20f825ee88f2e797e885684f2 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 15 Dec 2016 11:02:44 +0100 Subject: [PATCH] [FIX] maintenance: make equipments/requests visible to followers It used to be based on owners, but owners are automatically followers. Restricting on followers makes the visibility of equipments and requests consistent with the mail notifications linked to them. Avoids issues with "phantom notifications" that appear in the inbox counter but aren't visible. --- addons/maintenance/security/maintenance.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/maintenance/security/maintenance.xml b/addons/maintenance/security/maintenance.xml index cf564b0c859..a567eb8ddab 100644 --- a/addons/maintenance/security/maintenance.xml +++ b/addons/maintenance/security/maintenance.xml @@ -12,14 +12,14 @@ Users are allowed to access their own maintenance requests - ['|', ('owner_user_id.id', '=', user.id), ('technician_user_id.id', '=', user.id)] + ['|', ('message_partner_ids', 'in', [user.partner_id.id]), ('technician_user_id.id', '=', user.id)] - Users are allowed to access their own equipments + Users are allowed to access equipments they follow - [('owner_user_id.id', '=', user.id)] + [('message_partner_ids', 'in', [user.partner_id.id])]