From 6f874454bf7a2c9a303ef9299b09dc4f5c51ced1 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Wed, 15 Feb 2012 16:34:40 +0100 Subject: [PATCH] [FIX] share: create sharing rule even when no other ir.rule exists lp bug: https://launchpad.net/bugs/909150 fixed bzr revid: odo@openerp.com-20120215153440-c6ojz409kwzaus5w --- addons/share/wizard/share_wizard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/share/wizard/share_wizard.py b/addons/share/wizard/share_wizard.py index 80a0b12..09fb43c 100644 --- a/addons/share/wizard/share_wizard.py +++ b/addons/share/wizard/share_wizard.py @@ -600,7 +600,7 @@ class share_wizard(osv.osv_memory): combined_domain = expression.AND([new_clause, org_domain]) rule.write({'domain_force': combined_domain, 'name': rule.name + _('(Modified)')}) self._logger.debug("Combining sharing rule %s on model %s with domain: %s", rule.id, model_id, domain) - if not restrict: + if not rule_ids or not restrict: # Adding the new rule in the group is ok for normal cases, because rules # in the same group and for the same model will be combined with OR # (as of v6.1), so the desired effect is achieved. -- 1.7.10.4