mirror of
https://gitlab.com/flectra-community/reporting-engine.git
synced 2024-12-23 12:51:47 +00:00
174 lines
7.8 KiB
XML
174 lines
7.8 KiB
XML
|
<?xml version="1.0" encoding="utf-8" ?>
|
||
|
<!-- Copyright 2012 - Now Savoir-faire Linux <https://www.savoirfairelinux.com/>
|
||
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
||
|
<flectra>
|
||
|
<!-- KPI -->
|
||
|
<record id="view_kpi_tree" model="ir.ui.view">
|
||
|
<field name="name">kpi.tree</field>
|
||
|
<field name="model">kpi</field>
|
||
|
<field eval="8" name="priority" />
|
||
|
<field name="arch" type="xml">
|
||
|
<tree>
|
||
|
<field name="name" />
|
||
|
<field name="value" widget="progressbar" readonly="1" />
|
||
|
<field name="category_id" />
|
||
|
<field name="kpi_type" />
|
||
|
<field name="company_id" groups="base.group_multi_company" />
|
||
|
</tree>
|
||
|
</field>
|
||
|
</record>
|
||
|
<record id="view_kpi_kanban" model="ir.ui.view">
|
||
|
<field name="name">kpi.kanban</field>
|
||
|
<field name="model">kpi</field>
|
||
|
<field name="arch" type="xml">
|
||
|
<kanban class="o_kpi_kanban" create="false" edit="false" delete="false">
|
||
|
<field name="id" />
|
||
|
<field name="display_name" />
|
||
|
<field name="color" readonly="1" />
|
||
|
<field name="value" readonly="1" />
|
||
|
<field name="last_execution" />
|
||
|
<templates>
|
||
|
<t t-name="kanban-box">
|
||
|
<div class="oe_kanban_global_click o_kpi_kanban">
|
||
|
<div class="oe_kanban_details">
|
||
|
<div class="o_kanban_record_title oe_partner_heading">
|
||
|
<strong>
|
||
|
<field name="display_name" />
|
||
|
</strong>
|
||
|
</div>
|
||
|
<div
|
||
|
class="o_kanban_tags_section oe_kanban_partner_categories"
|
||
|
t-attf-style="color:#{record.color.raw_value}"
|
||
|
>
|
||
|
<strong>
|
||
|
<field name="value" readonly="1" />
|
||
|
</strong>
|
||
|
</div>
|
||
|
<div
|
||
|
class="o_kanban_tags_section oe_kanban_partner_categories"
|
||
|
>
|
||
|
<field name="last_execution" />
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</t>
|
||
|
</templates>
|
||
|
</kanban>
|
||
|
</field>
|
||
|
</record>
|
||
|
<record id="view_kpi_filter" model="ir.ui.view">
|
||
|
<field name="name">kpi.filter</field>
|
||
|
<field name="model">kpi</field>
|
||
|
<field name="arch" type="xml">
|
||
|
<search string="KPI">
|
||
|
<group>
|
||
|
<filter
|
||
|
name="active"
|
||
|
icon="terp-document-new"
|
||
|
domain="[('active','=',True)]"
|
||
|
string="Active"
|
||
|
help="Only active KPIs are computed by the scheduler based on the periodicity configuration."
|
||
|
/>
|
||
|
<separator orientation="vertical" />
|
||
|
<field name="name" />
|
||
|
<field name="category_id" />
|
||
|
<field name="company_id" group="base.group_multi_company" />
|
||
|
</group>
|
||
|
<newline />
|
||
|
<group expand="0" name="Group By...">
|
||
|
<filter name="Category" context="{'group_by':'category_id'}" />
|
||
|
<filter name="Type" context="{'group_by':'kpi_type'}" />
|
||
|
</group>
|
||
|
</search>
|
||
|
</field>
|
||
|
</record>
|
||
|
<record id="view_kpi_form" model="ir.ui.view">
|
||
|
<field name="name">kpi.form</field>
|
||
|
<field name="model">kpi</field>
|
||
|
<field name="arch" type="xml">
|
||
|
<form string="Key Performance Indicator">
|
||
|
<sheet>
|
||
|
<group>
|
||
|
<group>
|
||
|
<field name="name" />
|
||
|
<field name="threshold_id" />
|
||
|
<field name="category_id" />
|
||
|
</group>
|
||
|
<group>
|
||
|
<field name="value" colspan="2" readonly="1" />
|
||
|
<field name="active" colspan="2" />
|
||
|
<field
|
||
|
name="company_id"
|
||
|
groups="base.group_multi_company"
|
||
|
/>
|
||
|
<button
|
||
|
name="compute_kpi_value"
|
||
|
string="Compute KPI Now"
|
||
|
colspan="2"
|
||
|
type="object"
|
||
|
groups="kpi.group_kpi_manager"
|
||
|
/>
|
||
|
</group>
|
||
|
</group>
|
||
|
<notebook colspan="6">
|
||
|
<page string="History">
|
||
|
<field name="history_ids" readonly="1" nolabel="1" />
|
||
|
</page>
|
||
|
<page string="Computation" groups="kpi.group_kpi_manager">
|
||
|
<field name="kpi_type" invisible="1" />
|
||
|
<group>
|
||
|
<group>
|
||
|
<field name="periodicity" />
|
||
|
<field name="next_execution_date" readonly="1" />
|
||
|
</group>
|
||
|
<group>
|
||
|
<field name="periodicity_uom" />
|
||
|
</group>
|
||
|
</group>
|
||
|
<group string="KPI Computation">
|
||
|
<group>
|
||
|
<field name="kpi_type" />
|
||
|
<field
|
||
|
name="dbsource_id"
|
||
|
invisible="kpi_type != 'external'"
|
||
|
/>
|
||
|
</group>
|
||
|
<group>
|
||
|
<field name="kpi_code" />
|
||
|
</group>
|
||
|
</group>
|
||
|
</page>
|
||
|
<page string="Description">
|
||
|
<field name="description" nolabel="1" />
|
||
|
</page>
|
||
|
</notebook>
|
||
|
</sheet>
|
||
|
</form>
|
||
|
</field>
|
||
|
</record>
|
||
|
<record model="ir.actions.act_window" id="open_kpi_dashboard">
|
||
|
<field name="name">KPI Dashboard</field>
|
||
|
<field name="res_model">kpi</field>
|
||
|
<field name="view_mode">kanban,form</field>
|
||
|
<field name="search_view_id" ref="view_kpi_filter" />
|
||
|
</record>
|
||
|
<record id="action_view_kpi_kanban" model="ir.actions.act_window.view">
|
||
|
<field eval="1" name="sequence" />
|
||
|
<field name="view_mode">kanban</field>
|
||
|
<field name="view_id" ref="view_kpi_kanban" />
|
||
|
<field name="act_window_id" ref="open_kpi_dashboard" />
|
||
|
</record>
|
||
|
<record model="ir.actions.act_window" id="open_kpi_list">
|
||
|
<field name="name">KPI</field>
|
||
|
<field name="res_model">kpi</field>
|
||
|
<field name="view_mode">tree,form</field>
|
||
|
<field name="search_view_id" ref="view_kpi_filter" />
|
||
|
</record>
|
||
|
<record id="action_view_kpi_tree" model="ir.actions.act_window.view">
|
||
|
<field eval="2" name="sequence" />
|
||
|
<field name="view_mode">tree</field>
|
||
|
<field name="view_id" ref="view_kpi_tree" />
|
||
|
<field name="act_window_id" ref="open_kpi_list" />
|
||
|
</record>
|
||
|
</flectra>
|