summaryrefslogtreecommitdiff
path: root/addons/share/wizard/share_wizard.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/share/wizard/share_wizard.py')
-rw-r--r--addons/share/wizard/share_wizard.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/share/wizard/share_wizard.py b/addons/share/wizard/share_wizard.py
index 4813dc865bf..b9b6cf4f6e9 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,
@@ -600,8 +600,8 @@ class share_wizard(osv.TransientModel):
# other groups, so we duplicate if needed
rule = self._check_personal_rule_or_duplicate(cr, group_id, rule, context=context)
eval_ctx = rule_obj._eval_context_for_combinations()
- org_domain = expression.normalize_domain(eval(rule.domain_force, eval_ctx))
- new_clause = expression.normalize_domain(eval(domain, eval_ctx))
+ org_domain = expression.normalize_domain(safe_eval(rule.domain_force, eval_ctx))
+ new_clause = expression.normalize_domain(safe_eval(domain, eval_ctx))
combined_domain = expression.AND([new_clause, org_domain])
rule.write({'domain_force': combined_domain, 'name': rule.name + _('(Modified)')})
_logger.debug("Combining sharing rule %s on model %s with domain: %s", rule.id, model_id, domain)
@@ -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: