From b6272ed3a6be3b91559955fbda45097120f35732 Mon Sep 17 00:00:00 2001
From: Fabien Pinckaers <fp@tinyerp.com>
Date: Mon, 18 Oct 2010 11:28:13 +0200
Subject: [PATCH] [IMP] ir.rule reviewed

bzr revid: fp@tinyerp.com-20101018092813-gxalqnqhml7yyv6r
---
 bin/addons/base/res/res_security.xml       | 4 ++--
 bin/addons/base/security/base_security.xml | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/addons/base/res/res_security.xml b/bin/addons/base/res/res_security.xml
index fb9743fbe861..c6eee754ac4d 100644
--- a/bin/addons/base/res/res_security.xml
+++ b/bin/addons/base/res/res_security.xml
@@ -12,12 +12,12 @@
 
 
     <!-- Record Rule For Company -->
-    
+
     <record id="res_company_rule" model="ir.rule">
         <field name="name">company rule</field>
         <field model="ir.model" name="model_id" ref="model_res_company"/>
         <field eval="True" name="global"/>
-        <!-- <field name="domain_force">['|', ('child_ids', 'child_of', [user.company_id.id]), ('parent_id', 'child_of', [user.company_id.id])]</field> -->
+        <!-- TODO: review this <field name="domain_force">['|', ('child_ids', 'child_of', [user.company_id.id]), ('parent_id', 'child_of', [user.company_id.id])]</field> -->
         <field name="domain_force">[]</field>
     </record>
 
diff --git a/bin/addons/base/security/base_security.xml b/bin/addons/base/security/base_security.xml
index 8d34e32b9a97..ed36267031ed 100644
--- a/bin/addons/base/security/base_security.xml
+++ b/bin/addons/base/security/base_security.xml
@@ -51,7 +51,7 @@
         <field name="name">res.partner company</field>
         <field name="model_id" ref="model_res_partner"/>
         <field name="global" eval="True"/>
-        <field name="domain_force">[('company_id','child_of',[user.company_id.id])]</field>
+        <field name="domain_force">['|', ('company_id','child_of',[user.company_id.id]),('company_id','=',False)]</field>
     </record>
 
     <record model="ir.rule" id="multi_company_default_rule">
-- 
GitLab