[IMP]clean form view and improve hr employee form view

bzr revid: sgo@tinyerp.com-20120621061333-zfjlr55m0oo83f24
This commit is contained in:
Sanjay Gohel (Open ERP) 2012-06-21 11:43:33 +05:30
parent ce744386f4
commit 7ad658375f
6 changed files with 79 additions and 65 deletions

View File

@ -26,54 +26,52 @@
<!-- Put here related buttons -->
</div>
<field class="oe_right" name="photo" widget='image' on_change="onchange_photo(photo)"/>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1><field name="name"/></h1>
<label for="company_id" class="oe_edit_only" groups="base.group_multi_company"/>
<h2><field name="company_id" widget="selection" on_change="onchange_company(company_id)" groups="base.group_multi_company"/></h2>
<label for="department_id" class="oe_edit_only"/>
<h2><field name="department_id" on_change="onchange_department_id(department_id)"/></h2>
</div>
<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="General">
<field name="user_id" on_change="onchange_user(user_id)"/>
<field name="active"/>
<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>
<group groups="base.group_hr_user" string="Social IDs">
<field name="identification_id"/>
<field name="passport_id"/>
<field name="otherid"/>
</group>
<group groups="base.group_hr_user" string="Status">
<field name="gender"/>
<field name="marital"/>
<field name="country_id"/>
<!-- <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="address_home_id"/>
<field name="address_id" on_change="onchange_address_id(address_id)" />
<field name="work_phone"/>
<field name="mobile_phone"/>
<field name="work_email" widget="email" />
</group> -->
<!-- <group string="Contact Information">
<field name="work_location"/>
</group>
<group string="Job Information">
<field name="job_id" domain="[('state','!=','old')]" context="{'form_view_ref': 'hr.view_hr_job_employee_form'}"/>
<field name="coach_id" />
</group>
</group> -->
</group>
<separator string="Notes"/>
<field name="notes" placeholder="Other Information ..."/>
</page>
<page string="Categories" groups="base.group_hr_user">
<field name="category_ids" widget="many2many_tags"/>
</page>
<page string="Notes" groups="base.group_hr_user">
<field name="notes"/>
<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>
</sheet>

View File

@ -133,8 +133,8 @@
<field name="type">form</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<field name="coach_id" position="after">
<group colspan="2">
<field name="active" position="before">
<group colspan="2" col="5">
<field name="state"/>
<button name="attendance_action_change" states="present" string="Sign Out" type="object" icon="gtk-go-forward" context="{'type':'sign_out'}" groups="base.group_hr_user"/>
<button name="attendance_action_change" states="absent" string="Sign In" type="object" icon="gtk-go-back" context="{'type':'sign_in'}" groups="base.group_hr_user"/>

View File

@ -491,7 +491,10 @@
<field name="type">form</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<field name="coach_id" position="after">
<div class="oe_right oe_button_box" position="inside">
<button name="%(act_hr_employee_holiday_request)d" string="Leaves" type="action"/>
</div>
<field name="active" position="before">
<field name="remaining_leaves"/>
</field>
</field>

View File

@ -14,24 +14,26 @@
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<data>
<xpath expr="//page[@string='Personal Information']" position="after">
<page string="Miscellaneous" groups="base.group_hr_user">
<group colspan="2" col="2">
<separator string="Personal Info" colspan="2"/>
<field name="bank_account_id" context="{'display_partner':True, 'partner_id':partner_id}"/>
<field name="place_of_birth"/>
<field name="children"/>
<!-- <field name="basic" invisible="0"/> -->
</group>
<group colspan="2" col="2">
<separator string="Job Info" colspan="2"/>
<field name="manager" select="1"/>
<field name="vehicle" select="1"/>
<field name="vehicle_distance" select="1"/>
<field name="medic_exam" select="1" string="Medical Examination"/>
</group>
</page>
</xpath>
<div class="oe_right oe_button_box" position="inside">
<button name="%(act_hr_employee_payslip_list)d" string="Payslips" type="action"/>
</div>
<xpath expr="//field[@name='identification_id']" position="before">
<field name="manager" select="1"/>
</xpath>
<field name="otherid" position="after">
<field name="vehicle" select="1"/>
<field name="medic_exam" select="1" string="Medical Examination"/>
<field name="vehicle_distance" select="1"/>
</field>
<field name="address_home_id" position="after">
<field name="children"/>
</field>
<field name="birthday" position="after">
<field name="place_of_birth"/>
</field>
<field name="marital" position="before">
<field name="bank_account_id" context="{'display_partner':True, 'partner_id':partner_id}"/>
</field>
</data>
</field>
</record>
@ -45,9 +47,10 @@
<field name="inherit_id" ref="hr_contract.hr_contract_view_form"/>
<field name="arch" type="xml">
<data>
<xpath expr="//group[@name='right_column']" position="before">
<separator string="Payslip Info" colspan="2"/>
<field name="struct_id" required="1"/>
<xpath expr="//group[@name='right_column']" position="inside">
<group string="Payslip Info" colspan="2" col="2">
<field name="struct_id" required="1"/>
</group>
</xpath>
<xpath expr="//field[@name='working_hours']" position="after">
<field name="schedule_pay"/>
@ -753,7 +756,6 @@
<!-- Shortcuts -->
<act_window name="Payslips"
domain="[('employee_id', '=', active_id)]"
context="{'search_default_employee_id': [active_id], 'default_employee_id': active_id}"
res_model="hr.payslip"
src_model="hr.employee"

View File

@ -98,7 +98,7 @@
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<page string="Categories" position="after">
<page string="Personal Information" position="after">
<page string="Timesheets" groups="base.group_hr_user">
<field name="product_id" domain="[('type','=','service')]"/>
<field name="journal_id" widget="selection"/>

View File

@ -366,6 +366,17 @@
</tree>
</field>
</record>
<record id="hr_timesheet_sheet_employee_extd_form" model="ir.ui.view">
<field name="name">hr.timesheet.sheet.employee.extd_form</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<div class="oe_right oe_button_box" position="inside">
<button name="%(act_hr_employee_2_hr_timesheet)d" string="Timesheets" type="action"/>
</div>
</field>
</record>
<!-- Timesheet Button on Employee Form -->
<act_window