flectra/addons/helpdesk_basic/security/helpdesk_security_view.xml

67 lines
2.6 KiB
XML
Raw Permalink Normal View History

<?xml version="1.0" ?>
<flectra>
<record id="module_helpdesk_category" model="ir.module.category">
<field name="name">Helpdesk</field>
<field name="sequence">20</field>
</record>
<record model="res.groups" id="helpdesk_group_user">
<field name="name">User</field>
<field name="category_id" ref="module_helpdesk_category"/>
</record>
<record model="res.groups" id="helpdesk_group_manager">
<field name="name">Manager</field>
<field name="category_id" ref="module_helpdesk_category"/>
<field name="implied_ids" eval="[(4, ref('helpdesk_group_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>
2018-08-09 08:13:58 +02:00
<record id="helpdesk_portal_user_rule" model="ir.rule">
<field name="name">Portal See Own Issues</field>
<field ref="model_helpdesk_ticket" name="model_id"/>
<field name="domain_force">
['|', ('user_id','=',user.id), ('partner_id', '=', user.partner_id.id)]
</field>
<field name="groups" eval="[(4, ref('base.group_portal'))]"/>
</record>
<record id="helpdesk_user_rule" model="ir.rule">
<field name="name">See Own Issues</field>
<field ref="model_helpdesk_ticket" name="model_id"/>
<field name="domain_force">
['|', '|', ('assigned_to_id','=',user.id), ('partner_id', '=',
user.partner_id.id), ('team_id.member_ids','in',user.id)]
</field>
<field name="groups" eval="[(4, ref('helpdesk_group_user'))]"/>
</record>
<record id="helpdesk_user_create_own_rule" model="ir.rule">
<field name="name">Create Own Issues</field>
<field ref="model_helpdesk_ticket" name="model_id"/>
<field name="domain_force">
[('user_id','=',user.id)]
</field>
<field name="groups" eval="[(4, ref('helpdesk_group_user'))]"/>
<field name="perm_create" eval="True"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
</record>
<record id="rule_helpdesk_manager" model="ir.rule">
<field name="name">See All Issues</field>
<field ref="model_helpdesk_ticket" name="model_id"/>
<field name="domain_force">[(1, '=', 1)]</field>
<field name="groups" eval="[(4, ref('helpdesk_group_manager'))]"/>
</record>
<record id="helpdesk_team_manager_rule" model="ir.rule">
<field name="name">See All Team</field>
<field ref="model_helpdesk_team" name="model_id"/>
<field name="domain_force">[(1, '=', 1)]</field>
<field name="groups" eval="[(4, ref('helpdesk_group_manager'))]"/>
</record>
</flectra>