diff options
| author | Christophe Simonis <chs@odoo.com> | 2015-05-26 17:34:04 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2015-05-28 14:27:38 +0200 |
| commit | fe2b5f35a40ca8df662130608b0f89427a196362 (patch) | |
| tree | 0c7773f0599f3b1e6dbb869104fad0b04869b269 /addons/share/wizard/share_wizard.py | |
| parent | d4d8a2eae31e7a6a45029b84603e055300e3be36 (diff) | |
| parent | bf1e99964cdbc374f8a0c4cec1b338bf7c7c2930 (diff) | |
[MERGE] forward port of branch saas-6 up to bf1e999
Diffstat (limited to 'addons/share/wizard/share_wizard.py')
| -rw-r--r-- | addons/share/wizard/share_wizard.py | 8 |
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: |
