Files
enterprise-addons/hr_appraisal/views/hr_employee_views.xml
T

112 lines
5.4 KiB
XML

<?xml version="1.0" ?>
<odoo>
<record id="hr_employee_view_search" model="ir.ui.view">
<field name="name">hr.employee.view.search.inherit.appraisal</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_filter"/>
<field name="arch" type="xml">
<xpath expr="//filter[@name='message_needaction']" position="after">
<filter string="Upcoming Appraisals" name="next_appraisal"
domain="[('next_appraisal_date', '&lt;', '+90d')]"/>
</xpath>
<xpath expr="//filter[@name='group_start']" position="after">
<filter name="group_next_appraisal" string="Next Appraisal" domain="[]" context="{'group_by': 'next_appraisal_date'}"/>
</xpath>
</field>
</record>
<record id="hr_employee_view_form" model="ir.ui.view">
<field name="name">hr.employee.view.form.inherit.appraisal</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="priority" eval="10"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='%(hr.plan_wizard_action)d']" position="before">
<button name="action_send_appraisal_request"
string="Request Appraisal"
type="object"
data-hotkey="g"
class="btn btn-primary"
invisible="ongoing_appraisal_count or not id or not active"/>
<button name="action_send_appraisal_request"
string="Request Appraisal"
type="object"
data-hotkey="g"
class="btn btn-secondary"
invisible="not ongoing_appraisal_count or not active"/>
</xpath>
<button name="action_open_versions" position="before">
<field name="ongoing_appraisal_count" invisible="1"/>
<button name="action_open_employee_appraisals"
class="oe_stat_button"
icon="fa-star-half-o"
invisible="not appraisal_ids"
type="object"
groups="hr.group_hr_user"
>
<div class="o_field_widget o_stat_info">
<span class="o_stat_text"> <field name="appraisal_count" class="me-1"/>Appraisals</span>
<span class="o_stat_value" invisible="not last_ongoing_appraisal_date">
<field name="last_ongoing_appraisal_date" invisible="is_last_appraisal_late"/>
<field name="last_ongoing_appraisal_date" class="text-danger" invisible="not is_last_appraisal_late"/>
</span>
</div>
</button>
<button class="oe_stat_button" name="action_open_goals" icon="fa-bullseye" type="object">
<div class="o_field_widget o_stat_info">
<span class="o_stat_value">
<field name="goals_count"/>
</span>
<span class="o_stat_text">Goals</span>
</div>
</button>
</button>
<group name="application_group" position="attributes">
<attribute name="invisible">0</attribute>
</group>
<group name="user" position="after">
<group string="Appraisal">
<field name="next_appraisal_date" invisible="ongoing_appraisal_count != 0"/>
<field name="next_appraisal_date" placeholder="Ongoing" invisible="ongoing_appraisal_count == 0"/>
</group>
</group>
</field>
</record>
<record id="hr_employee_select_from_goal_view_list" model="ir.ui.view">
<field name="name">hr.employee.select.from.goal.view.list</field>
<field name="model">hr.employee</field>
<field name="arch" type="xml">
<list create="0" edit="0" delete="0" js_class="hr_employee_selection_list">
<field name="employee_id" widget="many2one_avatar_employee" width="200px"/>
<field name="department_id"/>
<field name="job_id"/>
</list>
</field>
</record>
<record id="view_employee_tree" model="ir.ui.view">
<field name="name">hr.employee.view.list.inherit</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_tree"/>
<field name="mode">primary</field>
<field name="arch" type="xml">
<xpath expr="//header" position="inside">
<button name="%(action_open_appraisal_campaign_wizard)d"
class="btn btn-secondary"
string="Launch Campaign"
type="action"
groups="hr_appraisal.group_hr_appraisal_user"
display="always"/>
</xpath>
<xpath expr="//list" position="inside">
<field name="next_appraisal_date" optional="hide"/>
</xpath>
</field>
</record>
<record id="hr.act_hr_employee_tree_view" model="ir.actions.act_window.view">
<field name="view_id" ref="hr_appraisal.view_employee_tree"/>
</record>
</odoo>