Files
public/directive_layer/security/roles.xml

41 lines
2.1 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<odoo>
<!--
Технические группы res.groups: на них висят ir.model.access и record rules
(has_group), а также auto-install дашборда исполнителя.
Определены ВЫШЕ res.users.role, чтобы ref(...) в implied_ids резолвился.
-->
<record id="role_directive_executor_res_groups" model="res.groups">
<field name="name">Директивы / Исполнитель</field>
</record>
<record id="role_directive_requester_res_groups" model="res.groups">
<field name="name">Директивы / Заявитель</field>
</record>
<record id="role_directive_dispatcher_res_groups" model="res.groups">
<field name="name">Директивы / Диспетчер</field>
</record>
<!--
Бизнес-роли res.users.role (base_user_role): используются в полях
executor_role_id/requester_role_id и в record rule через user.role_ids.
Связаны с техническими res.groups через implied_ids: назначение бизнес-роли
пользователю (set_groups_from_roles) добавляет role.implied_ids -> пользователь
попадает в соответствующую _res_groups (иначе ACL/rules fail-shut).
-->
<record id="role_directive_executor" model="res.users.role">
<field name="name">Директивы / Исполнитель</field>
<field name="implied_ids" eval="[(4, ref('role_directive_executor_res_groups'))]"/>
</record>
<record id="role_directive_requester" model="res.users.role">
<field name="name">Директивы / Заявитель</field>
<field name="implied_ids" eval="[(4, ref('role_directive_requester_res_groups'))]"/>
</record>
<record id="role_directive_dispatcher" model="res.users.role">
<field name="name">Директивы / Диспетчер</field>
<field name="implied_ids" eval="[(4, ref('role_directive_dispatcher_res_groups'))]"/>
</record>
</odoo>