[IMP] employee view

bzr revid: fp@tinyerp.com-20120807162216-b1uemxzhcd9t2eto
This commit is contained in:
Fabien Pinckaers 2012-08-07 18:22:16 +02:00
parent f5e7d53bce
commit f1ad3cfdee
2 changed files with 13 additions and 15 deletions

View File

@ -175,7 +175,7 @@ class hr_employee(osv.osv):
'work_location': fields.char('Office Location', size=32), 'work_location': fields.char('Office Location', size=32),
'notes': fields.text('Notes'), 'notes': fields.text('Notes'),
'parent_id': fields.many2one('hr.employee', 'Manager'), 'parent_id': fields.many2one('hr.employee', 'Manager'),
'category_ids': fields.many2many('hr.employee.category', 'employee_category_rel', 'emp_id', 'category_id', 'Categories'), 'category_ids': fields.many2many('hr.employee.category', 'employee_category_rel', 'emp_id', 'category_id', 'Tags'),
'child_ids': fields.one2many('hr.employee', 'parent_id', 'Subordinates'), 'child_ids': fields.one2many('hr.employee', 'parent_id', 'Subordinates'),
'resource_id': fields.many2one('resource.resource', 'Resource', ondelete='cascade', required=True), 'resource_id': fields.many2one('resource.resource', 'Resource', ondelete='cascade', required=True),
'coach_id': fields.many2one('hr.employee', 'Coach'), 'coach_id': fields.many2one('hr.employee', 'Coach'),

View File

@ -25,35 +25,33 @@
<div class="oe_title"> <div class="oe_title">
<label for="name" class="oe_edit_only"/> <label for="name" class="oe_edit_only"/>
<h1> <h1>
<field name="name" class="oe_inline"/> <field name="name"/>
<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> </h1>
<label for="department_id" class="oe_edit_only"/> <label for="job_id" class="oe_edit_only"/>
<h2><field name="department_id" on_change="onchange_department_id(department_id)"/></h2> <h2>
<field name="job_id" domain="[('state','!=','old')]" context="{'form_view_ref': 'hr.view_hr_job_employee_form'}"/>
</h2>
<label for="category_ids" class="oe_edit_only"/> <label for="category_ids" class="oe_edit_only"/>
<h3><field name="category_ids" widget="many2many_tags"/></h3> <h3><field name="category_ids" widget="many2many_tags" placeholder="e.g. Part Time"/></h3>
</div> </div>
<div class="oe_right oe_button_box" name="button_box"> <div class="oe_right oe_button_box" name="button_box">
<!-- Put here related buttons --> <!-- Put here related buttons -->
</div> </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> <notebook>
<page string="Information"> <page string="Information">
<group> <group>
<group> <group>
<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="user_id" on_change="onchange_user(user_id)"/>
<field name="parent_id"/> <field name="parent_id"/>
<field name="coach_id"/> <field name="coach_id"/>
</group> </group>
<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="identification_id" groups="base.group_hr_user"/>
<field name="passport_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="otherid" groups="base.group_hr_user"/>