[IMP]:hr,hr_payroll:improved view
[odoo/odoo.git] / addons / hr / hr_view.xml
index f462623..266ade6 100644 (file)
             <field name="arch" type="xml">
                 <form string="Employee" version="7.0">
                     <sheet>
-                    <div class="oe_right oe_button_box">
-                        <!-- Put here related buttons -->
-                    </div>
-                    <field class="oe_right" name="photo" widget='image' on_change="onchange_photo(photo)"/>
-                    <label for="name" class="oe_edit_only"/>
-                       <h1><field name="name"/>,
-                        <field name="company_id" class="oe_inline" widget="selection" on_change="onchange_company(company_id)" groups="base.group_multi_company"/>at
-                        <field name="job_id" class="oe_inline oe_edit_only" domain="[('state','!=','old')]" context="{'form_view_ref': 'hr.view_hr_job_employee_form'}"/>
-                    </h1>
-                    <label for="department_id" class="oe_edit_only"/>
-                    <h2><field name="department_id" on_change="onchange_department_id(department_id)"/></h2>
-                    <h3><field name="category_ids" widget="many2many_tags"/></h3>
-                    <group colspan="4" col="4">
-                        <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"/>
-                    </group>
-                    <notebook>
-                        <page string="Personal Information">
-                            <group>
-                                <group string="Linked User" colspan="4" col="4">
-                                    <field name="identification_id" groups="base.group_hr_user"/>
-                                    <field name="parent_id" />
-                                    <field name="passport_id" groups="base.group_hr_user"/>
-                                    <field name="coach_id"/>
-                                    <field name="otherid" groups="base.group_hr_user"/>
-                                    <field name="active"/>
-                                </group>
+                        <field name="photo" widget='image' class="oe_right" on_change="onchange_photo(photo)"/>    
+                        <div class="oe_right oe_button_box" name="button_box">
+                            <!-- Put here related buttons -->
+                        </div>
+                        <div class="oe_title">
+                            <label for="name" class="oe_edit_only"/>
+                            <h1>
+                                <field name="name" class="oe_inline"/>
+                                <label class="oe_inline" string="," attrs="{'invisible': [('job_id', '=', False)]}"/>
+                                <field class="oe_inline" name="job_id" domain="[('state','!=','old')]" context="{'form_view_ref': 'hr.view_hr_job_employee_form'}"/>
+                                <label class="oe_inline" string="at" attrs="{'invisible': [('company_id', '=', False)]}" groups="base.group_multi_company"/>
+                                <field class="oe_inline" name="company_id" groups="base.group_multi_company" on_change="onchange_company(company_id)"/>
+                            </h1>
+                            <label for="department_id" class="oe_edit_only"/>
+                            <h2><field name="department_id" on_change="onchange_department_id(department_id)"/></h2>
+                            <label for="category_ids" class="oe_edit_only"/>
+                            <h3><field name="category_ids" widget="many2many_tags"/></h3>
+                        </div>
+                        <group colspan="4" col="4">
+                            <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"/>
+                        </group>
+                        <notebook>
+                            <page string="Information">
+                                <group col="4">
+                                    <group string="Linked User">
+                                        <field name="parent_id" />
+                                        <field name="coach_id"/>
+                                    </group>
+                                    <group>
+                                        <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"/>
+                                        <field name="active"/>
+                                    </group>
                                 <!-- <group string="General">
                                     <field name="user_id" on_change="onchange_user(user_id)"/>
                                 </group> -->
-                               <!--  <group groups="base.group_hr_user" string="Status">
-                                    <field name="birthday"/>
-                                </group> -->
-                                <!-- <group string="Contact Information">
-                                    <field name="work_location"/>
-                                </group> -->
-                            </group>
-                            <separator string="Notes"/>
-                            <field name="notes" placeholder="Other Information ..."/>
-                        </page>
-                        <page string="Miscellaneous" groups="base.group_hr_user">
-                            <group colspan="4" col="4">
-                                 <field name="country_id"/>
-                                 <field name="gender"/>
-                                 <field name="marital"/>
-                                 <field name="address_home_id"/>
-                                 <field name="birthday"/>
-                            </group>
-                        </page>
-                    </notebook>
+                                </group>
+                                <field name="notes" placeholder="Other Information ..." colspan="4"/>
+                            </page>
+                            <page string="Personal Information" groups="base.group_hr_user">
+                                <group col="4">
+                                    <group>
+                                        <field name="country_id"/>
+                                        <field name="bank_account_id"/>
+                                        <field name="address_home_id"/>
+                                    </group>
+                                    <group>
+                                        <field name="gender"/>
+                                        <field name="marital"/>
+                                        <field name="birthday"/>
+                                    </group>
+                                </group>
+                            </page>
+                        </notebook>
                     </sheet>
                 </form>
             </field>
             <field name="type">search</field>
             <field name="arch" type="xml">
                 <search string="Employees">
-                    <field name="name"/>
-                    <field name="department_id" widget="selection">
-                    </field>
+                    <field name="name" string="Employees"/>
+                    <separator orientation="vertical"/>
+                    <field name="department_id" widget="selection"/>
                     <field name="job_id" widget="selection"/>
-                    <field name="category_ids"/>
                     <field name="parent_id"/>
-                    <newline />
+                    <field name="category_ids"/>
+                    <newline/>
                     <group expand="0" string="Group By...">
-                    <filter string="Manager" icon="terp-personal" domain="[]" context="{'group_by':'parent_id'}"/>
-                    <filter string="Coach" icon="terp-personal" domain="[]" context="{'group_by':'coach_id'}"/>
-                    <separator orientation="vertical" />
-                    <filter string="Department" icon="terp-personal+" domain="[]" context="{'group_by':'department_id'}"/>
-                    <filter string="Job" icon="terp-gtk-select-all" domain="[]" context="{'group_by':'job_id'}"/>
-                    <filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
+                        <filter string="Manager" icon="terp-personal" domain="[]" context="{'group_by':'parent_id'}"/>
+                        <filter string="Coach" icon="terp-personal" domain="[]" context="{'group_by':'coach_id'}"/>
+                        <separator orientation="vertical"/>
+                        <filter string="Department" icon="terp-personal+" domain="[]" context="{'group_by':'department_id'}"/>
+                        <filter string="Job" icon="terp-gtk-select-all" domain="[]" context="{'group_by':'job_id'}"/>
+                        <filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
                     </group>
                 </search>
              </field>
                         <field name="state" widget="statusbar" statusbar_visible="recruit,open"/>
                     </header>
                     <sheet>
-                        <group>
-                            <group>
-                                <field name="name" />
-                                <field name="department_id" />
-                                <field name="company_id" widget="selection" groups="base.group_multi_company"/>
-                            </group>
-                            <group>
-                                <field name="no_of_recruitment" on_change="on_change_expected_employee(no_of_recruitment,no_of_employee)"/>
-                                <field name="no_of_employee"/>
-                                <field name="expected_employees"/>
-                            </group>
+                        <label for="name" class="oe_edit_only"/>
+                        <h1>
+                            <field name="name" class="oe_inline"/>
+                            <label class="oe_inline" string="(" attrs="{'invisible': [('department_id', '=', False)]}"/>
+                            <field name="department_id" class="oe_inline"/>
+                            <label class="oe_inline" string=")" attrs="{'invisible': [('department_id', '=', False)]}"/>
+                        </h1>
+                        <label for="employee_ids" class="oe_edit_only"/>
+                        <h2>
+                            <field name="employee_ids" widget="many2many_tags" mode="tree,form"/>
+                        </h2>
+                        <group col="4">
+                            <field name="company_id" widget="selection" groups="base.group_multi_company"/>
+                            <field name="no_of_recruitment" on_change="on_change_expected_employee(no_of_recruitment,no_of_employee)"/>
+                            <field name="no_of_employee"/>
+                            <field name="expected_employees"/>
                         </group>
                         <notebook>
                             <page string="Description">
                                 <label for="requirements"/>
                                 <field name="requirements"/>
                             </page>
-                            <page string="Employees">
-                                <field name="employee_ids" widget="many2many" mode="tree,form"/>
-                            </page>
                         </notebook>
                     </sheet>
                 </form>
             <field name="type">search</field>
             <field name="arch" type="xml">
                 <search string="Jobs">
+                    <field name="name" string="Job"/>
+                    <separator orientation="vertical"/>
                     <filter icon="terp-camera_test"  
                             domain="[('state','=','open')]" 
                             string="In Position"
                     <filter icon="terp-personal+"  domain="[('state','=','recruit')]" string="In Recruitment"
                         help="In Recruitment"/>
                     <separator orientation="vertical"/>
-                    <field name="name"/>
-                    <field name="department_id" widget="selection">
-                    </field>
+                    <field name="department_id" widget="selection"/>
                     <newline />
                     <group expand="0" string="Group By...">
-                    <filter string="Department" icon="terp-personal+" domain="[]" context="{'group_by':'department_id'}"/>
-                    <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
-                    <filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}"  groups="base.group_multi_company"/>
+                        <filter string="Department" icon="terp-personal+" domain="[]" context="{'group_by':'department_id'}"/>
+                        <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
+                        <filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}"  groups="base.group_multi_company"/>
                     </group>
                 </search>
             </field>