forked from akretion/stock-logistics-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stock_scanner_security.xml
71 lines (64 loc) · 3.76 KB
/
stock_scanner_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
65
66
67
68
69
70
71
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="0">
<record model="res.groups" id="group_stock_scanner_sentinel">
<field name="name">Sentinel: technical users</field>
</record>
<record model="ir.rule" id="scanner_hardware_access_user">
<field name="name" >Scanner hardware users rules</field>
<field name="model_id" ref="model_scanner_hardware"/>
<field eval="1" name="perm_read"/>
<field eval="0" name="perm_create"/>
<field eval="1" name="perm_write"/>
<field eval="0" name="perm_unlink"/>
<field name="groups" eval="[(4, ref('base.group_user')),]"/>
<field name="domain_force">['|', ('user_id','=',user.id), ('user_id','=', False)]</field>
</record>
<record model="ir.rule" id="scanner_hardware_access_group_sentinel">
<field name="name" >Scanner hardware group sentinel rule</field>
<field name="model_id" ref="model_scanner_hardware"/>
<field eval="1" name="perm_read"/>
<field eval="0" name="perm_create"/>
<field eval="1" name="perm_write"/>
<field eval="0" name="perm_unlink"/>
<field name="groups" eval="[(4, ref('group_stock_scanner_sentinel')),]"/>
<field name="domain_force">[(1,'=', 1)]</field>
</record>
<record model="ir.rule" id="scanner_scenario_access_user_or_group">
<field name="name" >Scanner scenario users and groups rules</field>
<field name="model_id" ref="model_scanner_scenario"/>
<field eval="1" name="perm_read"/>
<field eval="0" name="perm_create"/>
<field eval="0" name="perm_write"/>
<field eval="0" name="perm_unlink"/>
<field name="domain_force">['|', ('user_ids','=',user.id), ('group_ids','in', [x.id for x in user.groups_id])]</field>
</record>
<record model="ir.rule" id="scanner_scenario_step_access_user_or_group">
<field name="name" >Scanner scenario step users and groups rules</field>
<field name="model_id" ref="model_scanner_scenario_step"/>
<field eval="1" name="perm_read"/>
<field eval="0" name="perm_create"/>
<field eval="0" name="perm_write"/>
<field eval="0" name="perm_unlink"/>
<field name="domain_force">['|', ('scenario_id.user_ids','=',user.id), ('scenario_id.group_ids','in', [x.id for x in user.groups_id])]</field>
</record>
<record model="ir.rule" id="scanner_scenario_transition_access_user_or_group">
<field name="name" >Scanner scenario transition users and groups rules</field>
<field name="model_id" ref="model_scanner_scenario_transition"/>
<field eval="1" name="perm_read"/>
<field eval="0" name="perm_create"/>
<field eval="0" name="perm_write"/>
<field eval="0" name="perm_unlink"/>
<field name="domain_force">['|', ('scenario_id.user_ids','=',user.id), ('scenario_id.group_ids','in', [x.id for x in user.groups_id])]</field>
</record>
<record model="ir.rule" id="scanner_scenario_custom_access_user_or_group">
<field name="name" >Scanner scenario custom users and groups rules</field>
<field name="model_id" ref="model_scanner_scenario_custom"/>
<field eval="1" name="perm_read"/>
<field eval="0" name="perm_create"/>
<field eval="0" name="perm_write"/>
<field eval="0" name="perm_unlink"/>
<field name="domain_force">['|', ('scenario_id.user_ids','=',user.id), ('scenario_id.group_ids','in', [x.id for x in user.groups_id])]</field>
</record>
</data>
</openerp>