mirror of
https://gitlab.com/flectra-community/server-ux.git
synced 2024-11-15 02:32:06 +00:00
59 lines
2.6 KiB
XML
59 lines
2.6 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<flectra>
|
|
<record id="category_announcement" model="ir.module.category">
|
|
<field name="name">Announcement</field>
|
|
</record>
|
|
<record id="announcemenent_manager" model="res.groups">
|
|
<field name="name">Announcement Manager</field>
|
|
<field name="category_id" ref="category_announcement" />
|
|
<field name="implied_ids" eval="[(4, ref('base.group_user'))]" />
|
|
<field
|
|
name="comment"
|
|
>Users allowed to manage and configure announcements.</field>
|
|
<field
|
|
name="users"
|
|
eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"
|
|
/>
|
|
</record>
|
|
<data noupdate="1">
|
|
<record model="ir.rule" id="announcement_log_rule">
|
|
<field name="name">Announcement log per user</field>
|
|
<field name="model_id" ref="model_announcement_log" />
|
|
<field name="domain_force">[('create_uid','=', user.id)]</field>
|
|
<field name="perm_read" eval="False" />
|
|
</record>
|
|
<record model="ir.rule" id="announcement_log_manager_rule">
|
|
<field name="name">Announcement log manager</field>
|
|
<field name="model_id" ref="model_announcement_log" />
|
|
<field name="domain_force">[(1, '=', 1)]</field>
|
|
<field
|
|
name="groups"
|
|
eval="[(4, ref('announcement.announcemenent_manager'))]"
|
|
/>
|
|
</record>
|
|
<record id="announcement_user_rule" model="ir.rule">
|
|
<field name="name">User announcements</field>
|
|
<field ref="model_announcement" name="model_id" />
|
|
<field
|
|
name="domain_force"
|
|
>[('active', '=', True), ('allowed_user_ids', 'in', user.id), ('in_date', '=', True)]</field>
|
|
<field name="groups" eval="[(4, ref('base.group_user'))]" />
|
|
</record>
|
|
<record id="announcement_manager_rule" model="ir.rule">
|
|
<field name="name">Announcement managers</field>
|
|
<field ref="model_announcement" name="model_id" />
|
|
<field name="domain_force">[(1, '=', 1)]</field>
|
|
<field
|
|
name="groups"
|
|
eval="[(4, ref('announcement.announcemenent_manager'))]"
|
|
/>
|
|
</record>
|
|
</data>
|
|
<!-- Company Rules !-->
|
|
<record id="rule_multi_company_announcement_tag" model="ir.rule">
|
|
<field name="name">Announcement Tag multi-company</field>
|
|
<field name="model_id" ref="model_announcement_tag" />
|
|
<field name="domain_force">[('company_id', 'in', [False] + company_ids)]</field>
|
|
</record>
|
|
</flectra>
|