-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathsecurity.xml
64 lines (53 loc) · 2.49 KB
/
security.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2024 Akretion France (http://www.akretion.com/)
@author: Alexis de Lattre <[email protected]>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<data noupdate="0">
<!-- Category, pour que ça apparaisse comme une "Application" -->
<record id="module_category_warehouse_management" model="ir.module.category">
<field name="name">Warehouse</field>
<field name="description">Helps you manage your inventory and main stock operations: delivery orders, receptions, etc.</field>
<field name="sequence">5</field>
</record>
<record id="group_stock_user" model="res.groups">
<field name="name">User</field>
<field name="category_id" ref="base.module_category_warehouse_management"/>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
</record>
<record id="group_stock_manager" model="res.groups">
<field name="name">Manager</field>
<field name="category_id" ref="base.module_category_warehouse_management"/>
<field name="implied_ids" eval="[(4, ref('group_stock_user'))]"/>
<!-- Automatically add admin to this group and default_user (v10 only) -->
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.default_user'))]"/>
</record>
</data>
<data noupdate="1">
<!-- since v10: default groups for new users -->
<record id="base.default_user" model="res.users">
<field name="groups_id" eval="[(4, ref('group_stock_user'))]"/>
</record>
<!-- RULES -->
<record id="fr_intrastat_service_rule" model="ir.rule">
<field name="name">Intrastat Service multi-company</field>
<field name="model_id" ref="model_report_intrastat_service"/>
<!-- Par défault, tous les perm_* sont à True -->
<field name="perm_read" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_write" eval="False"/>
<field name="perm_unlink" eval="False"/>
<!-- Si limité à un groupe : -->
<field name="groups" eval="[(4, ref('group_stock_user'))]"/>
<!-- Le champ "global" est un champ calculé qui se met automatiquement
à True is groups = False -->
<field name="domain_force">['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]</field>
<!-- v13+ -->
<field name="domain_force">['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]</field>
<!-- new : better perf -->
<field name="domain_force">[('company_id', 'in', company_ids + [False])]</field>
</record>
</data>
</odoo>