[FIX] res_partner: extend default security rule to show partners from ancestors companies too
This rules is not suited for most OpenERP objects, but it works well for partners and products as these records are usually shared between companies, and all company-specific data (such as acounting data is set as per-company properties). A partner or product can thus be shared cleanly between companies. This was already possible before by just removing the company assigned to the partner, making it globally visible. bzr revid: odo@openerp.com-20110303155918-zjdgwnorsiex8y8u
This commit is contained in:
parent
4f6b1e3136
commit
2094a6aa50
|
@ -51,7 +51,9 @@
|
|||
<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]),('company_id','=',False)]</field>
|
||||
<!-- Show partners from ancestors and descendants companies (or company-less), this is usually a better
|
||||
default for multicompany setups. -->
|
||||
<field name="domain_force">['|','|',('company_id.child_ids','child_of',[user.company_id.id]),('company_id','child_of',[user.company_id.id]),('company_id','=',False)]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.rule" id="multi_company_default_rule">
|
||||
|
|
Loading…
Reference in New Issue