[MERGE] employee form view

bzr revid: fp@tinyerp.com-20120907135538-pvr31vip94l7n5jc
This commit is contained in:
Fabien Pinckaers 2012-09-07 15:55:38 +02:00
commit c1c36798f5
9 changed files with 78 additions and 76 deletions

View File

@ -20,16 +20,12 @@
<field name="arch" type="xml">
<form string="Employee" version="7.0">
<sheet>
<field name="image_medium" widget='image' class="oe_right oe_avatar"/>
<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>
@ -37,44 +33,55 @@
<!-- 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)"/>
<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>

View File

@ -127,8 +127,8 @@
<label for="state"/>
<div>
<field name="state" class="oe_inline"/> -
<button class="oe_link" name="attendance_action_change" states="present" string="Sign Out" type="object" groups="base.group_hr_manager"/>
<button class="oe_link" name="attendance_action_change" states="absent" string="Sign In" type="object" groups="base.group_hr_manager"/>
<button class="oe_link" name="attendance_action_change" states="present" string="Sign Out" type="object" context="{'type':'sign_out'}" groups="base.group_hr_user"/>
<button class="oe_link" name="attendance_action_change" states="absent" string="Sign In" type="object" context="{'type':'sign_in'}" groups="base.group_hr_user"/>
</div>
</field>
</field>

View File

@ -1,7 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Contracts Button on Employee Form -->
<act_window
context="{'search_default_employee_id': [active_id], 'default_employee_id': active_id}"
id="act_hr_employee_2_hr_contract"
name="Contracts"
res_model="hr.contract"
src_model="hr.employee"
groups="base.group_hr_manager"/>
<menuitem id="next_id_56" name="Contract" parent="hr.menu_hr_configuration" sequence="30" groups="base.group_no_one"/>
<record id="hr_hr_employee_view_form2" model="ir.ui.view">
<field name="name">hr.hr.employee.view.form2</field>
@ -9,19 +20,20 @@
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<data>
<xpath expr="//field[@name='parent_id']" position="before">
<xpath expr="//div[@name='button_box']" position="inside">
<button name="%(act_hr_employee_2_hr_contract)d" string="Contracts" type="action"/>
</xpath>
<xpath expr="//field[@name='coach_id']" position="after">
<field name="manager"/>
</xpath>
<xpath expr="//group[@name='active_group']" position="before">
<group>
<group string="Contract">
<field name="medic_exam" string="Medical Exam"/>
<field name="vehicle"/>
<field name="vehicle_distance"/>
</group>
</xpath>
<field name="active" position="before">
<field name="medic_exam" string="Medical Exam"/>
</field>
<field name="birthday" position="before">
<field name="marital" position="after">
<field name="children"/>
</field>
<field name="birthday" position="after">
@ -177,15 +189,5 @@
<menuitem action="action_hr_contract_type" id="hr_menu_contract_type" parent="next_id_56" sequence="6" groups="base.group_no_one"/>
<menuitem action="action_hr_contract" id="hr_menu_contract" parent="hr.menu_hr_main" name="Contracts" sequence="4" groups="base.group_hr_manager"/>
<!-- Contracts Button on Employee Form -->
<act_window
context="{'search_default_employee_id': [active_id], 'default_employee_id': active_id}"
id="act_hr_employee_2_hr_contract"
name="Contracts"
res_model="hr.contract"
src_model="hr.employee"
groups="base.group_hr_manager"/>
</data>
</openerp>

View File

@ -128,14 +128,12 @@
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<page string="Personal Information" position="after">
<page string="Appraisal" groups="base.group_hr_user">
<group col="4">
<field name="evaluation_plan_id" on_change="onchange_evaluation_plan_id(evaluation_plan_id, evaluation_date)"/>
<field name="evaluation_date"/>
</group>
</page>
</page>
<xpath expr="//group[@name='active_group']" position="before">
<group string="Appraisals">
<field name="evaluation_plan_id" on_change="onchange_evaluation_plan_id(evaluation_plan_id, evaluation_date)"/>
<field name="evaluation_date"/>
</group>
</xpath>
</field>
</record>

View File

@ -513,13 +513,17 @@
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<field name="active" position="before">
<label for="remaining_leaves"/>
<div>
<field name="remaining_leaves" class="oe_inline"/>
<button name="%(act_hr_employee_holiday_request)d" string="Leaves" type="action" class="oe_inline oe_right"/>
</div>
</field>
<xpath expr="//group[@name='active_group']" position="before">
<group string="Leaves">
<label for="remaining_leaves"/>
<div>
<field name="remaining_leaves" class="oe_inline"/>
</div>
</group>
</xpath>
<xpath expr="//div[@name='button_box']" position="inside">
<button name="%(act_hr_employee_holiday_request)d" string="Leaves" type="action"/>
</xpath>
</field>
</record>

View File

@ -131,16 +131,12 @@
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<page string="Personal Information" position="after">
<page string="Timesheets" groups="base.group_hr_user">
<group>
<group col="2">
<field name="product_id" domain="[('type','=','service')]"/>
<field name="journal_id"/>
</group>
</group>
</page>
</page>
<xpath expr="//group[@name='active_group']" position="before">
<group string="Timesheets">
<field name="product_id" domain="[('type','=','service')]"/>
<field name="journal_id"/>
</group>
</xpath>
</field>
</record>

View File

@ -38,11 +38,11 @@
<record id="hr_employee_form__l10n_be_view_for" model="ir.ui.view">
<field name="name">hr.employee.inherit.form</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="inherit_id" ref="hr_contract.hr_hr_employee_view_form2"/>
<field name="priority">30</field>
<field name="arch" type="xml">
<data>
<xpath expr="//field[@name='gender']" position="before">
<xpath expr="//field[@name='vehicle_distance']" position="after">
<field name="resident_bool" eval="False"/>
</xpath>
<xpath expr="//field[@name='marital']" position="after">

View File

@ -3,7 +3,7 @@
<data>
<!-- add visibility field to the event form view -->
<record id="view_employee_form" model="ir.ui.view">
<record id="view_event_form_portal" model="ir.ui.view">
<field name="name">portal.event.form</field>
<field name="model">event.event</field>
<field name="inherit_id" ref="event.view_event_form"/>
@ -17,6 +17,5 @@
</xpath>
</field>
</record>
</data>
</openerp>

View File

@ -8,12 +8,8 @@
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<xpath expr="//page[last()]" position="after">
<page string="Portal Settings">
<group>
<field name="visibility"/>
</group>
</page>
<xpath expr="//field[@name='active']" position="before">
<field name="visibility"/>
</xpath>
</field>
</record>