[IMP] review of some hr form view

bzr revid: qdp-launchpad@openerp.com-20120704162910-zatsmoxyu2reaab2
This commit is contained in:
Quentin (OpenERP) 2012-07-04 18:29:10 +02:00
parent 900081de80
commit 6867bc1375
8 changed files with 56 additions and 51 deletions

View File

@ -48,20 +48,18 @@
<page string="Information">
<group>
<group>
<field name="user_id" on_change="onchange_user(user_id)"/>
<field name="parent_id" />
<field name="coach_id"/>
</group>
<group>
<!--<field name="identification_id" groups="base.group_hr_user"/>-->
<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"/>
</group>
<!-- <group string="General">
<field name="user_id" on_change="onchange_user(user_id)"/>
</group> -->
</group>
<field name="notes" placeholder="Other Information ..." colspan="4"/>
</page>
@ -376,15 +374,15 @@
<h2>
<field name="employee_ids" widget="many2many_tags" mode="tree,form"/>
</h2>
<group col="4">
<group>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</group>
<group>
<group>
<field name="no_of_employee"/>
<field name="expected_employees"/>
<field name="no_of_recruitment" on_change="on_change_expected_employee(no_of_recruitment,no_of_employee)"/>
</group>
<group>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</group>
</group>
<notebook>
<page string="Description">

View File

@ -137,9 +137,8 @@
<label for="state"/>
<div>
<field name="state" class="oe_inline"/>
<label/>
<button class="oe_inline" 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 class="oe_inline" name="attendance_action_change" states="absent" string="Sign In" type="object" icon="gtk-go-back" context="{'type':'sign_in'}" groups="base.group_hr_user"/>
<button class="oe_inline oe_right" 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 class="oe_inline oe_right" name="attendance_action_change" states="absent" string="Sign In" type="object" icon="gtk-go-back" context="{'type':'sign_in'}" groups="base.group_hr_user"/>
</div>
</field>
</field>

View File

@ -44,7 +44,7 @@ class hr_employee(osv.osv):
'place_of_birth': fields.char('Place of Birth', size=30),
'children': fields.integer('Number of Children'),
'vehicle': fields.char('Company Vehicle', size=64),
'vehicle_distance': fields.integer('Home-Work Distance', help="In kilometers"),
'vehicle_distance': fields.integer('Home-Work Dist.', help="In kilometers"),
'contract_ids': fields.one2many('hr.contract', 'employee_id', 'Contracts'),
'contract_id':fields.function(_get_latest_contract, string='Contract', type='many2one', relation="hr.contract", help='Latest contract of the employee'),
}

View File

@ -8,18 +8,18 @@
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<data>
<data>
<xpath expr="//field[@name='parent_id']" position="before">
<field name="manager"/>
</xpath>
<xpath expr="//group[@name='active_group']" position="before">
<xpath expr="//group[@name='active_group']" position="before">
<group>
<field name="vehicle"/>
<field name="vehicle_distance"/>
</group>
<field name="vehicle"/>
<field name="vehicle_distance"/>
</group>
</xpath>
<field name="active" position="before">
<field name="medic_exam" string="Medical Examination"/>
<field name="medic_exam" string="Medical Exam"/>
</field>
<field name="birthday" position="before">
<field name="children"/>
@ -30,7 +30,7 @@
<field name="bank_account_id" position="replace">
<field name="bank_account_id" context="{'display_partner':True, 'partner_id':partner_id}"/>
</field>
</data>
</data>
</field>
</record>
@ -69,26 +69,38 @@
<field name="arch" type="xml">
<form string="Contract" version="7.0">
<sheet>
<group col="4">
<field name="name" />
<field name="employee_id" />
<field name="job_id"/>
<field name="wage"/>
<field name="type_id"/>
</group>
<div class="oe_title">
<h1>
<field name="name" class="oe_inline"/>, <field name="employee_id" class="oe_inline"/>
</h1>
<h2>
<div>
<label for="job_id" class="oe_edit_only"/>
<field name="job_id"/>
</div>
<div>
<label for="type_id" class="oe_edit_only"/>
<field name="type_id"/>
</div>
</h2>
</div>
<notebook>
<page string="Information" name="information">
<group>
<group name="left_column" string="Duration">
<field name="date_start" />
<field name="date_end" />
<field name="working_hours"/>
<group name="salary_and_advantages" string="Salary and Advantages">
<field name="wage"/>
<field name="advantages" nolabel="1" placeholder="Advantages..." colspan="2"/>
</group>
<group name="trail" string="Trial Period">
<field name="trial_date_start" />
<field name="trial_date_end" />
<separator string="Advantages" colspan="2"/>
<field name="advantages" nolabel="1"/>
<group name="left_column" string="Duration">
<label for="trial_date_start" string="Trial Period Duration"/>
<div>
<field name="trial_date_start" class="oe_inline"/> - <field name="trial_date_end" class="oe_inline"/>
</div>
<label for="date_start" string="Duration"/>
<div>
<field name="date_start" class="oe_inline"/> - <field name="date_end" class="oe_inline"/>
</div>
<field name="working_hours"/>
</group>
</group>
<separator string="Notes"/>

View File

@ -115,6 +115,7 @@
<field name="name" attrs="{'readonly':[('state','!=','draft'),('state','!=','confirm')]}"/>
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" width="130" string="Mode" groups="base.group_hr_user"/>
<field name="employee_id" attrs="{'required':[('holiday_type','=','employee')],'invisible':[('holiday_type','=','category')]}" groups="base.group_hr_user"/>
<field name="category_id" attrs="{'required':[('holiday_type','=','category')], 'invisible':[('holiday_type','=','employee')], 'readonly':[('state','!=','draft'), ('state','!=','confirm')]}"/>
<field name="department_id" attrs="{'readonly':[('holiday_type','=','category')]}" groups="base.group_hr_user"/>
</group>
<group>
@ -173,6 +174,7 @@
<field name="name"/>
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" string="Allocation Mode" groups="base.group_hr_manager"/>
<field name="employee_id" attrs="{'required':[('holiday_type','=','employee')], 'invisible':[('holiday_type','=','category')]}"/>
<field name="category_id" attrs="{'required':[('holiday_type','=','category')], 'readonly':[('state','!=','draft')], 'invisible':[('holiday_type','=','employee')]}"/>
<field name="department_id" attrs="{'readonly':['|', ('holiday_type','=','category'), ('state','not in' ,('draft', 'confirm'))]}"/>
</group>
<group>
@ -541,7 +543,7 @@
<div>
<field name="remaining_leaves" class="oe_inline"/>
<label/>
<button name="%(act_hr_employee_holiday_request)d" string="Leaves" type="action" class="oe_inline"/>
<button name="%(act_hr_employee_holiday_request)d" string="Leaves" type="action" class="oe_inline oe_right"/>
</div>
</field>
</field>

View File

@ -45,10 +45,8 @@
<field name="inherit_id" ref="hr_contract.hr_contract_view_form"/>
<field name="arch" type="xml">
<data>
<xpath expr="//group[@name='trail']" position="after">
<group string="Payslip Info">
<field name="struct_id" required="1"/>
</group>
<xpath expr="//field[@name='wage']" position="after">
<field name="struct_id" required="1"/>
</xpath>
<xpath expr="//field[@name='working_hours']" position="after">
<field name="schedule_pay"/>

View File

@ -174,7 +174,7 @@
<field name="survey" invisible="1"/>
<field name="response" invisible="1"/>
<field name="department_id" on_change="onchange_department_id(department_id)"/>
<div><field name="state" groups="base.group_no_one"/></div>
<field name="state" groups="base.group_no_one"/>
</group>
</group>
<notebook>

View File

@ -16,16 +16,12 @@
<field name="meal_voucher_amount"/>
<field name="misc_advantage_amount"/>
</xpath>
<xpath expr="//group[@name='trail']" position="after">
<group string="Miscellaneous">
<field name="additional_net_amount"/>
<field name="retained_net_amount"/>
</group>
<group string="By Worker">
<field name="insurance_employee_deduction"/>
<field name="meal_voucher_employee_deduction"/>
<field name="car_employee_deduction"/>
</group>
<xpath expr="//field[@name='advantages']" position="before">
<field name="additional_net_amount"/>
<field name="retained_net_amount"/>
<field name="insurance_employee_deduction"/>
<field name="meal_voucher_employee_deduction"/>
<field name="car_employee_deduction"/>
</xpath>
</data>
</field>