summaryrefslogtreecommitdiff
path: root/addons/share
diff options
context:
space:
mode:
authorDenis Ledoux <dle@odoo.com>2015-05-12 11:30:16 +0200
committerDenis Ledoux <dle@odoo.com>2015-05-12 11:33:43 +0200
commit55fb3f6ff2a83b2bb299ba13aa48feacb6601928 (patch)
tree87019bb081809540820ea4646a2693daf75934aa /addons/share
parent953a5509d23c098bcb9813343c475b8e4fa85f16 (diff)
[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
Diffstat (limited to 'addons/share')
-rw-r--r--addons/share/wizard/share_wizard.py4
1 files 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: