[MERGE][IMP]merge with parent branch and change in employee form view as per suggestion
[odoo/odoo.git] / addons / hr / hr_view.xml
index ff789c5..565ca4e 100644 (file)
         <record id="view_employee_form" model="ir.ui.view">
             <field name="name">hr.employee.form</field>
             <field name="model">hr.employee</field>
-            <field name="type">form</field>
             <field name="arch" type="xml">
                 <form string="Employee" version="7.0">
                     <sheet>
-                        <field name="image_small" widget='image' class="oe_right oe_image_small"/>
+                        <field name="image_medium" widget='image' class="oe_left oe_avatar"/>
                         <div class="oe_title">
                             <label for="name" class="oe_edit_only"/>
                             <h1>
                                 <field name="name"/>
                             </h1>
-                            <label for="job_id" class="oe_edit_only"/>
-                            <h2>
-                                <field name="job_id" options='{"no_open": true}' domain="[('state','!=','old')]" context="{'form_view_ref': 'hr.view_hr_job_employee_form'}"/>
-                            </h2>
                             <label for="category_ids" class="oe_edit_only"/>
                             <field name="category_ids" widget="many2many_tags" placeholder="e.g. Part Time"/>
                         </div>
                             <!-- Put here related buttons -->
                         </div>
                         <notebook>
-                            <page string="Information">
+                            <page string="Public Information">
                                 <group>
-                                    <group>
+                                    <group string="Contact Information">
+                                        <field name="work_email" widget="email"/>
+                                        <field name="work_phone"/>
+                                        <field name="mobile_phone"/>
+                                    </group>
+                                    <group string="Position">
                                         <field name="department_id" on_change="onchange_department_id(department_id)"/>
-                                        <field name="company_id" groups="base.group_multi_company" on_change="onchange_company(company_id)"/>
-                                        <field name="user_id" on_change="onchange_user(user_id)" options='{"no_open": true}'/>
+                                        <field name="job_id" options='{"no_open": true}' domain="[('state','!=','old')]" context="{'form_view_ref': 'hr.view_hr_job_employee_form'}"/>
                                         <field name="parent_id"/>
                                         <field name="coach_id"/>
                                     </group>
                                     <group>
-                                        <field name="work_email" widget="email"/>
-                                        <field name="work_phone"/>
-                                        <field name="address_id" on_change="onchange_address_id(address_id)"/>
-                                        <field name="mobile_phone"/>
-                                        <field name="identification_id" groups="base.group_hr_user"/>
-                                        <field name="passport_id" groups="base.group_hr_user"/>
-                                        <field name="otherid" groups="base.group_hr_user"/>
-                                    </group>
-                                    <group name="active_group">
-                                        <field name="active"/>
+                                        <field name="company_id" groups="base.group_multi_company" on_change="onchange_company(company_id)"/>
+                                        <field name="user_id" on_change="onchange_user(user_id)" string="Related User"/>
+                                        <field name="address_id" on_change="onchange_address_id(address_id)" context="{'show_address': 1}" options='{"always_reload": true, "highlight_first_line": true}'/>
                                     </group>
                                 </group>
                                 <field name="notes" placeholder="Other Information ..." colspan="4"/>
                             </page>
                             <page string="Personal Information" groups="base.group_hr_user">
-                                <group col="4">
-                                    <group>
+                                <group>
+                                    <group string="Citizenship &amp; other info">
                                         <field name="country_id" options='{"no_open": true}'/>
+                                        <field name="identification_id" groups="base.group_hr_user"/>
+                                        <field name="passport_id" groups="base.group_hr_user"/>
                                         <field name="bank_account_id"/>
-                                        <field name="address_home_id"/>
+                                        <field name="otherid" groups="base.group_hr_user"/>
                                     </group>
-                                    <group>
+                                    <group string="Contact Information">
+                                        <field name="address_home_id" context="{'show_address': 1}" options='{"always_reload": true, "highlight_first_line": true}'/>
+                                    </group>
+                                    <group string="Status">
                                         <field name="gender"/>
                                         <field name="marital"/>
+                                    </group>
+                                    <group string="Birth">
                                         <field name="birthday"/>
                                     </group>
                                 </group>
                             </page>
+                            <page string="HR Settings" groups="base.group_hr_user">
+                                <group>
+                                    <group string="Active" name="active_group">
+                                        <field name="active"/>
+                                    </group>
+                                </group>
+                            </page>
                         </notebook>
                     </sheet>
                 </form>
@@ -85,7 +91,6 @@
         <record id="view_employee_tree" model="ir.ui.view">
             <field name="name">hr.employee.tree</field>
             <field name="model">hr.employee</field>
-            <field name="type">tree</field>
             <field name="arch" type="xml">
                 <tree string="Employees">
                     <field name="name"/>
         <record id="view_employee_filter" model="ir.ui.view">
             <field name="name">Employees</field>
             <field name="model">hr.employee</field>
-            <field name="type">search</field>
             <field name="arch" type="xml">
                 <search string="Employees">
                     <field name="name" string="Employees"/>
     <record model="ir.ui.view" id="hr_kanban_view_employees">
         <field name="name">HR - Employess Kanban</field>
         <field name="model">hr.employee</field>
-        <field name="type">kanban</field>
         <field name="arch" type="xml">
             <kanban>
                 <field name="last_login"/>
                     <t t-name="kanban-box">
                         <div class="oe_employee_vignette">
                             <div class="oe_employee_image">
-                                <a type="edit"><img t-att-src="kanban_image('hr.employee', 'image_medium', record.id.value)" class="oe_employee_picture"/></a>
+                                <a type="open"><img t-att-src="kanban_image('hr.employee', 'image_medium', record.id.value)" class="oe_employee_picture"/></a>
                             </div>
                             <div class="oe_employee_details">
                                 <h4>
-                                    <a type="edit"><field name="name"/><t t-if="record.login.raw_value"> (<field name="login"/>)</t></a>
+                                    <a type="open"><field name="name"/><t t-if="record.login.raw_value"> (<field name="login"/>)</t></a>
                                 </h4>
                                 <ul>
                                     <li id="last_login">
         <record id="view_partner_tree2" model="ir.ui.view">
             <field name="name">hr.employee.tree</field>
             <field name="model">hr.employee</field>
-            <field name="type">tree</field>
             <field name="field_parent">child_ids</field>
             <field eval="20" name="priority"/>
             <field name="arch" type="xml">
        <record id="view_employee_category_form" model="ir.ui.view">
             <field name="name">hr.employee.category.form</field>
             <field name="model">hr.employee.category</field>
-            <field name="type">form</field>
             <field name="arch" type="xml">
                 <form string="Employee Category" version="7.0">
                     <group>
         <record id="view_employee_category_list" model="ir.ui.view">
             <field name="name">hr.employee.category.list</field>
             <field name="model">hr.employee.category</field>
-            <field name="type">tree</field>
             <field eval="8" name="priority"/>
             <field name="arch" type="xml">
                 <tree string="Employees Categories">
         <record id="view_employee_category_tree" model="ir.ui.view">
             <field name="name">hr.employee.category.tree</field>
             <field name="model">hr.employee.category</field>
-            <field name="type">tree</field>
             <field name="field_parent">child_ids</field>
             <field name="arch" type="xml">
                 <tree string="Employees Categories">
         <record id="view_hr_job_form" model="ir.ui.view">
             <field name="name">hr.job.form</field>
             <field name="model">hr.job</field>
-            <field name="type">form</field>
             <field name="arch" type="xml">
                 <form string="Job" version="7.0">
                     <header>
         <record id="view_hr_job_tree" model="ir.ui.view">
             <field name="name">hr.job.tree</field>
             <field name="model">hr.job</field>
-            <field name="type">tree</field>
             <field name="arch" type="xml">
                 <tree string="Job">
                     <field name="name"/>
         <record id="view_job_filter" model="ir.ui.view">
             <field name="name">Job</field>
             <field name="model">hr.job</field>
-            <field name="type">search</field>
             <field name="arch" type="xml">
                 <search string="Jobs">
                     <field name="name" string="Job"/>
         <record id="view_hr_job_employee_form" model="ir.ui.view">
             <field name="name">hr.job.employee.form</field>
             <field name="model">hr.job</field>
-            <field name="type">form</field>
             <field name="priority">20</field>
             <field name="arch" type="xml">
                 <form string="Job" version="7.0">