169 lines
10 KiB
XML
169 lines
10 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data>
|
|
<!-- KPI Line Form View (Detailed Worksheet) -->
|
|
<record id="view_kpi_kpi_line_form" model="ir.ui.view">
|
|
<field name="name">kpi.kpi.line.form</field>
|
|
<field name="model">kpi.kpi.line</field>
|
|
<field name="arch" type="xml">
|
|
<form string="KPI Worksheet">
|
|
<header>
|
|
<button name="action_generate_periods" string="Regenerate Periods" type="object" class="oe_highlight" confirm="This will reset all data in the worksheet. Are you sure?"/>
|
|
</header>
|
|
<sheet>
|
|
<div class="oe_title">
|
|
<h1><field name="name" readonly="1"/></h1>
|
|
<h3><field name="code" readonly="1"/></h3>
|
|
</div>
|
|
<group>
|
|
<group string="Configuration">
|
|
<field name="perspective"/>
|
|
<field name="uom"/>
|
|
<field name="weight"/>
|
|
<field name="periodicity"/>
|
|
<field name="polarization"/>
|
|
</group>
|
|
<group string="Targets & Limits">
|
|
<field name="target" string="Target (Full Year)"/>
|
|
<field name="target_ytd"/>
|
|
|
|
<field name="threshold_min"/>
|
|
<field name="threshold_max" invisible="polarization != 'range'"/>
|
|
<field name="target_min" invisible="polarization != 'range'"/>
|
|
<field name="target_max" invisible="polarization != 'range'"/>
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page string="Realization Worksheet">
|
|
<field name="period_line_ids">
|
|
<list string="Periods" editable="bottom" create="false" delete="false">
|
|
<field name="sequence" widget="handle"/>
|
|
<field name="name" readonly="1"/>
|
|
<field name="date_start" optional="hide"/>
|
|
<field name="date_end" optional="hide"/>
|
|
<field name="date_end" optional="hide"/>
|
|
<field name="target" optional="hide" widget="float" options="{'digits': [16, 2]}"/>
|
|
<field name="realization" widget="float" options="{'digits': [16, 2]}"/>
|
|
<field name="state" invisible="1"/>
|
|
</list>
|
|
</field>
|
|
<group class="oe_right">
|
|
<field name="realization" string="Total Realization"/>
|
|
<field name="score"/>
|
|
<field name="final_score"/>
|
|
</group>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
<footer>
|
|
<button string="Save" name="action_save_worksheet" type="object" class="oe_highlight"/>
|
|
<button string="Discard" special="cancel"/>
|
|
</footer>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- KPI Line Tree view for embedding -->
|
|
<record id="view_kpi_kpi_line_tree" model="ir.ui.view">
|
|
<field name="name">kpi.kpi.line.list</field>
|
|
<field name="model">kpi.kpi.line</field>
|
|
<field name="arch" type="xml">
|
|
<list string="KPI Lines" editable="bottom">
|
|
<field name="perspective"/>
|
|
<field name="code"/>
|
|
<field name="name"/>
|
|
<field name="polarization" optional="show"/>
|
|
<field name="uom" optional="hide"/>
|
|
<field name="weight" sum="Total Weight" widget="float" options="{'digits': [16, 2]}"/>
|
|
<field name="target_ytd" string="Target" widget="float" options="{'digits': [16, 2]}"/>
|
|
|
|
<!-- Optional detail fields for Min-Max -->
|
|
<field name="threshold_min" optional="hide" widget="float" options="{'digits': [16, 2]}"/>
|
|
<field name="threshold_max" optional="hide" invisible="polarization != 'range'" widget="float" options="{'digits': [16, 2]}"/>
|
|
<field name="target_min" optional="hide" invisible="polarization != 'range'" widget="float" options="{'digits': [16, 2]}"/>
|
|
<field name="target_max" optional="hide" invisible="polarization != 'range'" widget="float" options="{'digits': [16, 2]}"/>
|
|
|
|
<field name="realization" widget="float" options="{'digits': [16, 2]}"/>
|
|
<field name="score" widget="float" options="{'digits': [16, 2]}"/>
|
|
<field name="final_score" sum="Total Score" widget="float" options="{'digits': [16, 4]}"/>
|
|
<button name="action_open_worksheet" type="object" icon="fa-cogs" title="Open Worksheet"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- KPI Header Form View -->
|
|
<record id="view_kpi_kpi_form" model="ir.ui.view">
|
|
<field name="name">kpi.kpi.form</field>
|
|
<field name="model">kpi.kpi</field>
|
|
<field name="arch" type="xml">
|
|
<form string="KPI">
|
|
<header>
|
|
<button name="action_confirm" string="Confirm" type="object" invisible="state != 'draft'" class="oe_highlight" groups="employee_kpi.group_kpi_manager"/>
|
|
<button name="action_done" string="Mark as Done" type="object" invisible="state != 'confirmed'" class="oe_highlight" groups="employee_kpi.group_kpi_manager"/>
|
|
<button name="action_draft" string="Reset to Draft" type="object" invisible="state == 'draft'" groups="employee_kpi.group_kpi_manager"/>
|
|
<field name="state" widget="statusbar"/>
|
|
</header>
|
|
<sheet>
|
|
<div class="oe_title">
|
|
<h1><field name="name"/></h1>
|
|
</div>
|
|
<group>
|
|
<group>
|
|
<field name="employee_id"/>
|
|
<field name="job_id"/>
|
|
<field name="department_id"/>
|
|
</group>
|
|
<group>
|
|
<field name="period"/>
|
|
<field name="manager_id"/>
|
|
<field name="total_score" widget="progressbar"/>
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page string="KPI Details">
|
|
<field name="line_ids">
|
|
<list string="KPI Lines" editable="bottom">
|
|
<field name="perspective"/>
|
|
<field name="code"/>
|
|
<field name="name"/>
|
|
<field name="polarization" optional="show"/>
|
|
<field name="uom" optional="hide"/>
|
|
<field name="weight" widget="float" options="{'digits': [16, 2]}"/>
|
|
<field name="target_ytd" string="Target" widget="float" options="{'digits': [16, 2]}"/>
|
|
<!-- Threshold fields for Min-Max -->
|
|
<field name="threshold_min" optional="hide" widget="float" options="{'digits': [16, 2]}"/>
|
|
<field name="target_min" optional="hide" invisible="polarization != 'range'" widget="float" options="{'digits': [16, 2]}"/>
|
|
<field name="target_max" optional="hide" invisible="polarization != 'range'" widget="float" options="{'digits': [16, 2]}"/>
|
|
<field name="threshold_max" optional="hide" invisible="polarization != 'range'" widget="float" options="{'digits': [16, 2]}"/>
|
|
<field name="realization" widget="float" options="{'digits': [16, 2]}"/>
|
|
<field name="score" widget="float" options="{'digits': [16, 2]}"/>
|
|
<field name="final_score" widget="float" options="{'digits': [16, 2]}"/>
|
|
<button name="action_open_worksheet" type="object" icon="fa-cogs" title="Open Worksheet"/>
|
|
</list>
|
|
</field>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
<chatter/>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- KPI Header Tree View -->
|
|
<record id="view_kpi_kpi_tree" model="ir.ui.view">
|
|
<field name="name">kpi.kpi.list</field>
|
|
<field name="model">kpi.kpi</field>
|
|
<field name="arch" type="xml">
|
|
<list string="Employee KPIs">
|
|
<field name="name"/>
|
|
<field name="employee_id"/>
|
|
<field name="period"/>
|
|
<field name="department_id"/>
|
|
<field name="total_score" widget="progressbar"/>
|
|
<field name="state" widget="badge" decoration-info="state == 'draft'" decoration-success="state == 'done'"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
</data>
|
|
</odoo>
|