[FIX] missing multi company currency access rules, set currency.company_id to False by default
lp bug: https://launchpad.net/bugs/1111298 fixed bzr revid: alexandre.fayolle@camptocamp.com-20130517080246-k23d8hd0ks36cr5l
This commit is contained in:
parent
19c7bfa179
commit
3d9c8b0513
|
@ -73,6 +73,7 @@ class res_currency(osv.osv):
|
|||
'position' : 'after',
|
||||
'rounding': 0.01,
|
||||
'accuracy': 4,
|
||||
'company_id': False,
|
||||
}
|
||||
_sql_constraints = [
|
||||
# this constraint does not cover all cases due to SQL NULL handling for company_id,
|
||||
|
|
|
@ -87,6 +87,14 @@
|
|||
<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 Rule for Currency -->
|
||||
<record id="res_currency_rule" model="ir.rule">
|
||||
<field name="name">currency rule</field>
|
||||
<field model="ir.model" name="model_id" ref="model_res_currency"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
|
Loading…
Reference in New Issue