-
Notifications
You must be signed in to change notification settings - Fork 0
/
hr_policy_ot_view.xml
117 lines (108 loc) · 4.97 KB
/
hr_policy_ot_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
117
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Policy Lines -->
<record id="ot_policy_line_tree_view" model="ir.ui.view">
<field name="name">hr.policy.line.ot.tree</field>
<field name="model">hr.policy.line.ot</field>
<field name="arch" type="xml">
<tree string="Overtime Lines">
<field name="name"/>
<field name="code"/>
<field name="type"/>
<field name="rate"/>
<field name="active_after"/>
<field name="active_start_time"/>
<field name="active_end_time"/>
</tree>
</field>
</record>
<record id="ot_policy_line_form_view" model="ir.ui.view">
<field name="name">hr.policy.line.ot.form</field>
<field name="model">hr.policy.line.ot</field>
<field name="arch" type="xml">
<form string="Overtime Policy" 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="weekly_working_days" attrs="{'invisible': [('type','!=','weekly')]}"/>
<field name="active_after" attrs="{'required': [('type','=','weekly')]}"/>
<field name="rate"/>
</group>
<group>
<field name="active_start_time" attrs="{'invisible': [('type','!=','daily')]}"/>
<field name="active_end_time" attrs="{'invisible': [('type','!=','daily')]}"/>
<field name="tz" attrs="{'invisible': [('type','!=','daily')], 'required': ['&', ('active_start_time', '!=',''), ('active_start_time', '!=', False)]}"/>
<field name="policy_id"/>
</group>
</group>
</sheet>
</form>
</field>
</record>
<!-- Overtime Policy -->
<record id="ot_policy_view_tree" model="ir.ui.view">
<field name="name">hr.policy.ot.tree</field>
<field name="model">hr.policy.ot</field>
<field name="arch" type="xml">
<tree string="Overtime Policies">
<field name="name"/>
<field name="date"/>
</tree>
</field>
</record>
<record id="ot_policy_view_form" model="ir.ui.view">
<field name="name">hr.policy.ot.form</field>
<field name="model">hr.policy.ot</field>
<field name="arch" type="xml">
<form string="Overtime 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></group>
</group>
<group string="Overtime Lines">
<field name="line_ids" nolabel="1" editable="top"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="open_ot_policy" model="ir.actions.act_window">
<field name="name">Overtime Policies</field>
<field name="res_model">hr.policy.ot</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem action="open_ot_policy"
id="menu_hr_ot_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.otinherit</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="ot_policy_ids"/>
</xpath>
</field>
</record>
</data>
</openerp>