<field name="arch" type="xml">
<form string="Employee" version="7.0">
<sheet>
- <div class="oe_right oe_form_button_box">
+ <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)"/>
- <div class="oe_form_title">
- <label for="name" class="oe_form_readonly_hidden"/>
+ <field class="oe_right" name="image_small" widget='image' on_change="onchange_image(image_small)"/>
+ <div class="oe_title">
+ <label for="name" class="oe_edit_only"/>
<h1><field name="name"/></h1>
- <label for="department_id" class="oe_form_readonly_hidden"/>
- <h2>
- <field name="company_id" widget="selection" groups="base.group_multi_company" on_change="onchange_company(company_id)"/>,
- <field name="department_id" on_change="onchange_department_id(department_id)" />
- </h2>
+
+ <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>
<notebook>
<page string="Personal Information">
<group>
- <group>
+ <group string="General">
<field name="user_id" on_change="onchange_user(user_id)"/>
<field name="active"/>
<field name="parent_id" />
</group>
<group groups="base.group_hr_user" string="Social IDs">
- <field name="ssnid"/>
- <field name="sinid"/>
<field name="identification_id"/>
<field name="passport_id"/>
<field name="otherid"/>
<field name="work_location"/>
</group>
<group string="Job Information">
- <field name="job_id" domain="[('state','!=','old')]"/>
+ <field name="job_id" domain="[('state','!=','old')]" context="{'form_view_ref': 'hr.view_hr_job_employee_form'}"/>
<field name="coach_id" />
</group>
</group>
</page>
<page string="Categories" groups="base.group_hr_user">
- <field name="category_ids"/>
+ <field name="category_ids" widget="many2many_tags"/>
</page>
<page string="Notes" groups="base.group_hr_user">
<field name="notes"/>
<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="type">kanban</field>
<field name="arch" type="xml">
<kanban>
+ <field name="last_login"/>
<templates>
<t t-name="kanban-box">
<div class="oe_employee_vignette">
<div class="oe_employee_image">
- <a type="edit"><img t-att-src="kanban_image('hr.employee', 'photo', record.id.value)" class="oe_employee_picture"/></a>
+ <a type="edit"><img t-att-src="kanban_image('hr.employee', 'image_medium', record.id.value)" class="oe_employee_picture"/></a>
</div>
<div class="oe_employee_details">
<h4><a type="edit"><field name="name"/> (<field name="login"/>)</a></h4>
<ul>
+ <li id="last_login">
+ <span t-if="record.last_login.raw_value && record.last_login.raw_value.is().today()" class="oe_kanban_button" style="font-size: 100%%">
+ <t t-esc="record.last_login.raw_value.toString('HH:mm')"/>
+ </span>
+ </li>
<li t-if="record.job_id.raw_value"><field name="job_id"/></li>
<li t-if="record.work_location.raw_value"><field name="work_location"/></li>
<li t-if="record.work_phone.raw_value">Tel: <field name="work_phone"/></li>
<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>
- </record>
-
+ </field>
+ </record>
+
+ <record id="view_hr_job_employee_form" model="ir.ui.view">
+ <field name="name">hr.job.employee.form</field>
+ <field name="model">hr.job</field>
+ <field name="type">form</field>
+ <field name="priority">20</field>
+ <field name="arch" type="xml">
+ <form string="Job" version="7.0">
+ <group col="4">
+ <field name="name" />
+ <field name="department_id" />
+ </group>
+ <label for="description"/>
+ <field name="description"/>
+ </form>
+ </field>
+ </record>
+
<record model="ir.actions.act_window" id="action_hr_job">
<field name="name">Job Positions</field>
<field name="res_model">hr.job</field>