~unifield-team/unifield-wm/us-826

« back to all changes in this revision

Viewing changes to msf_homere_interface/hr_view.xml

  • Committer: Olivier DOSSMANN
  • Date: 2013-05-31 14:22:09 UTC
  • mto: This revision was merged to the branch mainline in revision 1687.
  • Revision ID: od@tempo-consulting.fr-20130531142209-sbcwvzuema11guzz
UF-1991 [FIX] Problem with wizard on "msg" field. Change it to "name".

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="UTF-8"?>
 
2
<openerp>
 
3
    <data>
 
4
 
 
5
    <!--
 
6
        Employee Form
 
7
    -->
 
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)"/>
 
23
                    <newline/>
 
24
                    <field name="department_id" widget="selection" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)]}"/>
 
25
                    <field name="parent_id"/>
 
26
                </group>
 
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}"/>
 
31
                    <newline />
 
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}"/>
 
34
                </group>
 
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)]}"/>
 
43
                        </group>
 
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)]}"/>
 
50
                        </group>
 
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)]}"/>
 
60
                        </group>
 
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)]}"/>
 
65
                        </group>
 
66
                    </page>
 
67
                    <page string="Categories">
 
68
                        <field name="category_ids" nolabel="1" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)]}"/>
 
69
                    </page>
 
70
                    <page string="Notes">
 
71
                        <field colspan="4" nolabel="1" name="notes" attrs="{'readonly': [('employee_type', '=', 'local'), ('allow_edition', '=', False)]}"/>
 
72
                    </page>
 
73
                </notebook>
 
74
            </form>
 
75
        </field>
 
76
    </record>
 
77
 
 
78
    <!--
 
79
        Employee Tree
 
80
    -->
 
81
 
 
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:
 
89
            * cost center
 
90
            * funding pool
 
91
            * free 1
 
92
            * free 2
 
93
    -->
 
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">
 
100
            <data>
 
101
                <xpath expr="/tree" position="attributes">
 
102
                    <attribute name="colors">red:not active</attribute>
 
103
                </xpath>
 
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')]}"/>
 
110
                </field>
 
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"/>
 
118
                </field>
 
119
            </data>
 
120
        </field>
 
121
    </record>
 
122
 
 
123
    <!--
 
124
        Editable Employee Tree
 
125
    -->
 
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"/>
 
143
            </tree>
 
144
        </field>
 
145
    </record>
 
146
 
 
147
    <!--
 
148
        Employee Search
 
149
    -->
 
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">
 
156
            <data>
 
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'" />
 
161
                </xpath>
 
162
                <xpath expr="/search/field[@name='department_id']" position="replace">
 
163
                </xpath>
 
164
                <xpath expr="/search/field[@name='parent_id']" position="replace">
 
165
                </xpath>
 
166
                <xpath expr="//filter[@string='Manager']" position="replace">
 
167
                </xpath>
 
168
                <xpath expr="//filter[@string='Coach']" position="replace">
 
169
                </xpath>
 
170
                <xpath expr="//filter[@string='Department']" position="replace">
 
171
                </xpath>
 
172
                <xpath expr="//filter[@string='Company']" position="replace">
 
173
                </xpath>
 
174
            </data>
 
175
        </field>
 
176
    </record>
 
177
 
 
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">
 
183
            <search>
 
184
                <filter icon="terp-personal+" domain="[('active','=',True)]" name="active" string="Active" groups="base.group_extended"/>
 
185
                <separator orientation="vertical" />
 
186
                <field name="name"/>
 
187
                <field name="job_id" widget="selection"/>
 
188
                <newline />
 
189
                <group expand="0" string="Group By...">
 
190
                    <filter string="Job" icon="terp-gtk-select-all" domain="[]" context="{'group_by':'job_id'}"/>
 
191
                </group>
 
192
            </search>
 
193
        </field>
 
194
    </record>
 
195
 
 
196
    </data>
 
197
</openerp>