From 55fb3f6ff2a83b2bb299ba13aa48feacb6601928 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Tue, 12 May 2015 11:30:16 +0200 Subject: [PATCH] [FIX] share: do not add new rules for `res.company` When trying to share a partner through the share feature, a new record rule was added on `res.company`, allowing the access to this model only if the `partner_id` of the `res.company` was equal to the user `partner_id`. Except that the share users must have access to the company he is currently in. opw-634402 --- addons/share/wizard/share_wizard.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/share/wizard/share_wizard.py b/addons/share/wizard/share_wizard.py index bf6e19a12a3..32bb9d71ea5 100644 --- a/addons/share/wizard/share_wizard.py +++ b/addons/share/wizard/share_wizard.py @@ -493,7 +493,7 @@ class share_wizard(osv.TransientModel): # already granted for dummy, model in fields_relations: # mail.message is transversal: it should not received directly the access rights - if model.model in ['mail.message', 'mail.notification']: continue + if model.model in ['mail.message', 'mail.notification', 'res.company']: continue values = { 'name': _('Copied access for sharing'), 'group_id': group_id, @@ -625,7 +625,7 @@ class share_wizard(osv.TransientModel): if domain: for rel_field, model in fields_relations: # mail.message is transversal: it should not received directly the access rights - if model.model in ['mail.message', 'mail.notification']: continue + if model.model in ['mail.message', 'mail.notification', 'res.company']: continue related_domain = [] if not rel_field: continue for element in domain: