[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
This commit is contained in:
parent
953a5509d2
commit
55fb3f6ff2
|
@ -493,7 +493,7 @@ class share_wizard(osv.TransientModel):
|
||||||
# already granted
|
# already granted
|
||||||
for dummy, model in fields_relations:
|
for dummy, model in fields_relations:
|
||||||
# mail.message is transversal: it should not received directly the access rights
|
# 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 = {
|
values = {
|
||||||
'name': _('Copied access for sharing'),
|
'name': _('Copied access for sharing'),
|
||||||
'group_id': group_id,
|
'group_id': group_id,
|
||||||
|
@ -625,7 +625,7 @@ class share_wizard(osv.TransientModel):
|
||||||
if domain:
|
if domain:
|
||||||
for rel_field, model in fields_relations:
|
for rel_field, model in fields_relations:
|
||||||
# mail.message is transversal: it should not received directly the access rights
|
# 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 = []
|
related_domain = []
|
||||||
if not rel_field: continue
|
if not rel_field: continue
|
||||||
for element in domain:
|
for element in domain:
|
||||||
|
|
Loading…
Reference in New Issue