flectra/addons/event/security/event_security.xml
2018-01-16 02:34:37 -08:00

46 lines
2.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<flectra>
<data noupdate="0">
<record id="group_event_user" model="res.groups">
<field name="name">User</field>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
<field name="category_id" ref="base.module_category_event_management"/>
</record>
<record id="group_event_manager" model="res.groups">
<field name="name">Manager</field>
<field name="category_id" ref="base.module_category_event_management"/>
<field name="implied_ids" eval="[(4, ref('group_event_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>
</data>
<data noupdate="1">
<record id="base.default_user" model="res.users">
<field name="groups_id" eval="[(4,ref('event.group_event_manager'))]"/>
</record>
<!-- Multi - Company Rules -->
<record model="ir.rule" id="event_event_company_rule">
<field name="name">Event: multi-company</field>
<field name="model_id" ref="model_event_event"/>
<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="event_registration_company_rule">
<field name="name">Event/Registration: multi-company</field>
<field name="model_id" ref="model_event_registration"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',
('company_id', '=', False),
('company_id', 'child_of', [user.company_id.id]),
]
</field>
</record>
</data>
</flectra>