1
<?xml version="1.0" encoding="UTF-8"?>
9
<record id="view_employee_form" model="ir.ui.view">
10
<field name="name">view.employee.form</field>
11
<field name="model">hr.employee</field>
12
<field name="type">form</field>
13
<field name="priority" eval="15"/>
14
<field name="arch" type="xml">
15
<form string="Employee">
16
<group colspan="4" col="8">
17
<field name="allow_edition" invisible="1"/>
18
<field colspan="6" name="name" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)]}"/>
19
<field name="user_id" on_change="onchange_user(user_id)" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)]}"/>
20
<field name="company_id" widget="selection" on_change="onchange_company(company_id)" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)]}"/>
21
<field name="active" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)]}"/>
22
<field name="employee_type" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)]}" on_change="onchange_type(employee_type)"/>
24
<field name="department_id" widget="selection" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)]}"/>
25
<field name="parent_id"/>
27
<group colspan="4" col="8">
28
<field name="destination_id" attrs="{'invisible': [('employee_type', '!=', 'local')]}" context="{'search_default_active': 1, 'hide_inactive': 1}"/>
29
<field name="cost_center_id" on_change="onchange_cc(cost_center_id, funding_pool_id)" attrs="{'invisible': [('employee_type', '!=', 'local')]}" context="{'search_default_active': 1, 'hide_inactive': 1}"/>
30
<field name="funding_pool_id" attrs="{'invisible': [('employee_type', '!=', 'local')]}" context="{'search_default_active': 1, 'hide_inactive': 1}"/>
32
<field name="free1_id" attrs="{'invisible': [('employee_type', '!=', 'local')]}" context="{'search_default_active': 1, 'hide_inactive': 1}"/>
33
<field name="free2_id" attrs="{'invisible': [('employee_type', '!=', 'local')]}" context="{'search_default_active': 1, 'hide_inactive': 1}"/>
35
<notebook colspan="6">
36
<page string="Personal Information">
37
<group col="2" colspan="2">
38
<separator colspan="2" string="Social IDs"/>
39
<field name="ssnid" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)]}"/>
40
<field name="sinid" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)]}"/>
41
<field name="identification_id" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)], 'required': [('employee_type', '=', 'local')]}"/>
42
<field name="passport_id" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)]}"/>
44
<group col="2" colspan="2">
45
<separator string="Status" colspan="2"/>
46
<field name="gender" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)]}"/>
47
<field name="marital" widget="selection" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)]}"/>
48
<field name="country_id" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)]}"/>
49
<field name="birthday" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)]}"/>
51
<group col="2" colspan="2">
52
<separator string="Contact Information" colspan="2"/>
53
<field name="address_home_id" colspan="2" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)]}"/>
54
<field name="partner_id" invisible="1" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)]}"/>
55
<field name="address_id" colspan="2" on_change="onchange_address_id(address_id)" domain="[('partner_id', '=', partner_id)]" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)]}"/>
56
<field name="work_phone" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)]}"/>
57
<field name="mobile_phone" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)]}"/>
58
<field name="work_email" widget="email" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)]}"/>
59
<field name="work_location" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)]}"/>
61
<group col="2" colspan="2">
62
<separator string="Position" colspan="2"/>
63
<field name="job_id" domain="[('state','!=','old')]" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)]}"/>
64
<field name="coach_id" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)]}"/>
67
<page string="Categories">
68
<field name="category_ids" nolabel="1" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)]}"/>
71
<field colspan="4" nolabel="1" name="notes" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)]}"/>
82
<!-- Change some elements:
83
* delete work phone column
84
* delete work e-mail column
85
* delete department column
86
* delete manager column (parent_id)
87
* add employee ID (identification_id) after description (name)
88
* add analytic distribution elements:
94
<record id="inherit_view_employee_tree" model="ir.ui.view">
95
<field name="name">inherit.view.employee.tree</field>
96
<field name="model">hr.employee</field>
97
<field name="type">tree</field>
98
<field name="inherit_id" ref="hr.view_employee_tree"/>
99
<field name="arch" type="xml">
101
<xpath expr="/tree" position="attributes">
102
<attribute name="colors">red:not active</attribute>
104
<field name="work_phone" position="replace"/>
105
<field name="work_email" position="replace"/>
106
<field name="department_id" position="replace"/>
107
<field name="parent_id" position="replace"/>
108
<field name="name" position="after">
109
<field name="identification_id" attrs="{'required': [('employee_type', '=', 'local')]}"/>
111
<field name="job_id" position="after">
112
<field name="destination_id" context="{'search_default_active': 1, 'hide_inactive': 1}"/>
113
<field name="cost_center_id" on_change="onchange_cc(cost_center_id, funding_pool_id)" context="{'search_default_active': 1, 'hide_inactive': 1}"/>
114
<field name="funding_pool_id" context="{'search_default_active': 1, 'hide_inactive': 1}"/>
115
<field name="free1_id" context="{'search_default_active': 1, 'hide_inactive': 1}"/>
116
<field name="free2_id" context="{'search_default_active': 1, 'hide_inactive': 1}"/>
117
<field name="active" invisible="1"/>
124
Editable Employee Tree
126
<record id="editable_view_employee_tree" model="ir.ui.view">
127
<field name="name">editable.view.employee.tree</field>
128
<field name="model">hr.employee</field>
129
<field name="type">tree</field>
130
<field name="arch" type="xml">
131
<tree string="Employees" editable="top" colors="red:not active">
132
<field name="allow_edition" invisible="1"/>
133
<field name="name" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)]}"/>
134
<field name="identification_id" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)], 'required': [('employee_type', '=', 'local')]}"/>
135
<field name="job_id" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)]}"/>
136
<field name="destination_id" domain="[('category', '=', 'DEST'), ('type', '!=', 'view'), ('state', '=', 'open')]" context="{'search_default_active': 1, 'hide_inactive': 1}"/>
137
<field name="cost_center_id" on_change="onchange_cc(cost_center_id, funding_pool_id)" context="{'search_default_active': 1, 'hide_inactive': 1}"/>
138
<field name="funding_pool_id" context="{'search_default_active': 1, 'hide_inactive': 1}"/>
139
<field name="free1_id" context="{'search_default_active': 1, 'hide_inactive': 1}"/>
140
<field name="free2_id" context="{'search_default_active': 1, 'hide_inactive': 1}"/>
141
<field name="active" invisible="1"/>
142
<field name="employee_type" invisible="1"/>
150
<record id="inherit_view_employee_filter" model="ir.ui.view">
151
<field name="name">inherit.view.employee.filter</field>
152
<field name="model">hr.employee</field>
153
<field name="type">search</field>
154
<field name="inherit_id" ref="hr.view_employee_filter"/>
155
<field name="arch" type="xml">
157
<xpath expr="/search/filter[@name='active']" position="after">
158
<separator orientation="vertical" />
159
<filter icon="gtk-leave-fullscreen" domain="[('employee_type','=','local')]" name="employee_type_local" string="Local" />
160
<filter icon="gtk-quit" domain="[('employee_type','=','ex')]" name="employee_type_expatriate" string="Expat'" />
162
<xpath expr="/search/field[@name='department_id']" position="replace">
164
<xpath expr="/search/field[@name='parent_id']" position="replace">
166
<xpath expr="//filter[@string='Manager']" position="replace">
168
<xpath expr="//filter[@string='Coach']" position="replace">
170
<xpath expr="//filter[@string='Department']" position="replace">
172
<xpath expr="//filter[@string='Company']" position="replace">
178
<record id="view_employee_filter_2" model="ir.ui.view">
179
<field name="name">view.employee.filter.2</field>
180
<field name="model">hr.employee</field>
181
<field name="type">search</field>
182
<field name="arch" type="xml">
184
<filter icon="terp-personal+" domain="[('active','=',True)]" name="active" string="Active" groups="base.group_extended"/>
185
<separator orientation="vertical" />
187
<field name="job_id" widget="selection"/>
189
<group expand="0" string="Group By...">
190
<filter string="Job" icon="terp-gtk-select-all" domain="[]" context="{'group_by':'job_id'}"/>