Browse Source

[ADD] mgmtsystem_*_security.xml files

pull/510/head^2
Maxime Chambreuil 11 years ago
parent
commit
ca3a5a330e
  1. 3
      mgmtsystem_kpi/__openerp__.py
  2. 36
      mgmtsystem_kpi/security/mgmtsystem_kpi_security.xml

3
mgmtsystem_kpi/__openerp__.py

@ -53,8 +53,9 @@ This module depends on:
'web_color', 'web_color',
], ],
"data" : [ "data" : [
'mgmtsystem_kpi_view.xml',
'security/ir.model.access.csv', 'security/ir.model.access.csv',
'security/mgmtsystem_kpi_security.xml',
'mgmtsystem_kpi_view.xml',
], ],
"images" : [ "images" : [
"images/kpi_definition.png", "images/kpi_definition.png",

36
mgmtsystem_kpi/security/mgmtsystem_kpi_security.xml

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<!-- Rule -->
<record model="ir.rule" id="mgmtsystem_kpi_rule">
<field name="name">mgmtsystem_kpi multi-company</field>
<field name="model_id" ref="model_mgmtsystem_kpi"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record model="ir.rule" id="mgmtsystem_kpi_threshold_range_rule">
<field name="name">mgmtsystem_kpi_threshold_range multi-company</field>
<field name="model_id" ref="model_mgmtsystem_kpi_threshold_range"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record model="ir.rule" id="mgmtsystem_kpi_threshold_rule">
<field name="name">mgmtsystem_kpi_threshold multi-company</field>
<field name="model_id" ref="model_mgmtsystem_kpi_threshold"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record model="ir.rule" id="mgmtsystem_kpi_history_rule">
<field name="name">mgmtsystem_kpi_history multi-company</field>
<field name="model_id" ref="model_mgmtsystem_kpi_history"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
</data>
</openerp>
Loading…
Cancel
Save