-
Notifications
You must be signed in to change notification settings - Fork 0
/
hr_policy_presence_view.xml
116 lines (107 loc) · 4.72 KB
/
hr_policy_presence_view.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Holiday Policy Lines -->
<record id="presence_policy_line_tree_view" model="ir.ui.view">
<field name="name">hr.policy.line.presence.tree</field>
<field name="model">hr.policy.line.presence</field>
<field name="arch" type="xml">
<tree string="Presence Lines">
<field name="name"/>
<field name="code"/>
<field name="type"/>
<field name="rate"/>
<field name="active_after"/>
<field name="duration"/>
</tree>
</field>
</record>
<record id="presence_policy_line_form_view" model="ir.ui.view">
<field name="name">hr.policy.line.presence.form</field>
<field name="model">hr.policy.line.presence</field>
<field name="arch" type="xml">
<form string="Presence Policy Line" version="7.0">
<sheet>
<h1>
<label for="name" string="Name" class="oe_edit_only"/>
<field name="name"/>
</h1>
<h1>
<label for="code" string="Code" class="oe_edit_only"/>
<field name="code"/>
</h1>
<group>
<group>
<field name="type"/>
<field name="active_after" attrs="{'required': [('type','=','weekly')]}"/>
<field name="duration"/>
<field name="rate"/>
</group>
<group>
<field name="policy_id"/>
</group>
</group>
</sheet>
</form>
</field>
</record>
<!-- Presence Policy -->
<record id="presence_policy_view_tree" model="ir.ui.view">
<field name="name">hr.policy.presence.tree</field>
<field name="model">hr.policy.presence</field>
<field name="arch" type="xml">
<tree string="Presence Policies">
<field name="name"/>
<field name="date"/>
<field name="work_days_per_month"/>
</tree>
</field>
</record>
<record id="presence_policy_view_form" model="ir.ui.view">
<field name="name">hr.policy.presence.form</field>
<field name="model">hr.policy.presence</field>
<field name="arch" type="xml">
<form string="Presence Policy" version="7.0">
<sheet>
<h1>
<label for="name" string="Name" class="oe_edit_only"/>
<field name="name"/>
</h1>
<group>
<group>
<field name="date"/>
</group>
<group>
<field name="work_days_per_month"/>
</group>
</group>
<group string="Policy Lines">
<field name="line_ids" nolabel="1" editable="top"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="open_presence_policy" model="ir.actions.act_window">
<field name="name">Presence Policies</field>
<field name="res_model">hr.policy.presence</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem action="open_presence_policy"
id="menu_hr_presence_policy"
parent="hr_policy_group.menu_hr_policy_configuration"
sequence="10"/>
<!-- Policy Group -->
<record id="policy_group_view_form" model="ir.ui.view">
<field name="name">hr.policy.group.form.presenceinherit</field>
<field name="model">hr.policy.group</field>
<field name="inherit_id" ref="hr_policy_group.policy_group_view_form"/>
<field name="arch" type="xml">
<xpath expr="//group[@name='left']" position="inside">
<field name="presence_policy_ids"/>
</xpath>
</field>
</record>
</data>
</openerp>