addons-cm/network_partner/security/network_partner_security.xml

79 lines
3.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record model="ir.module.category" id="module_management">
<field name="name">Network Partner module access</field>
<field name="description">User access level for this module</field>
<field name="sequence">3</field>
</record>
<record id="group_np_user" model="res.groups">
<field name="name">User</field>
<field name="category_id" ref="network_partner.module_management"/>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
</record>
<record id="group_np_manager" model="res.groups">
<field name="name">Manager</field>
<field name="category_id" ref="network_partner.module_management"/>
<field name="implied_ids" eval="[(4, ref('network_partner.group_np_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
</record>
</data>
<data noupdate="1">
<record id="base.default_user" model="res.users">
<field name="groups_id" eval="[(4,ref('network_partner.group_np_user'))]"/>
</record>
<record model="ir.rule" id="network_partner_node_read_rule">
<field name="name">network.partner.node.read.rule</field>
<field name="model_id" ref="model_partner_node" />
<field name="global" eval="True"/>
<field name="domain_force">[(1, '=', 1)]</field>
<field name="groups" eval="[(4,ref('network_partner.group_np_user'))]" />
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="False"/>
<field name="perm_unlink" eval="False"/>
<field name="perm_create" eval="False"/>
</record>
<record model="ir.rule" id="network_partner_node_write_rule">
<field name="name">network.partner.node.write.rule</field>
<field name="model_id" ref="model_partner_node" />
<field name="global" eval="True"/>
<field name="domain_force">[(1, '=', 1)]</field>
<field name="groups" eval="[(4,ref('network_partner.group_np_manager'))]" />
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_unlink" eval="True"/>
<field name="perm_create" eval="True"/>
</record>
<record model="ir.rule" id="network_partner_net_read_rule">
<field name="name">network.partner.net.read.rule</field>
<field name="model_id" ref="model_partner_network" />
<field name="global" eval="True"/>
<field name="domain_force">[(1, '=', 1)]</field>
<field name="groups" eval="[(4,ref('network_partner.group_np_user'))]" />
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="False"/>
<field name="perm_unlink" eval="False"/>
<field name="perm_create" eval="False"/>
</record>
<record model="ir.rule" id="network_partner_net_write_rule">
<field name="name">network.partner.net.write.rule</field>
<field name="model_id" ref="model_partner_network" />
<field name="global" eval="True"/>
<field name="domain_force">[(1, '=', 1)]</field>
<field name="groups" eval="[(4,ref('network_partner.group_np_manager'))]" />
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_unlink" eval="True"/>
<field name="perm_create" eval="True"/>
</record>
</data>
</odoo>