|
|
@ -6,6 +6,7 @@ |
|
|
|
<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 string="Key Performance Indicators"> |
|
|
|
<field name="name"/> |
|
|
@ -16,6 +17,33 @@ |
|
|
|
</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"/> |
|
|
|
<field name="value"/> |
|
|
|
<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"/></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> |
|
|
@ -51,21 +79,26 @@ |
|
|
|
<group> |
|
|
|
<group> |
|
|
|
<field name="name" /> |
|
|
|
<field name="threshold_id" /> |
|
|
|
<field name="category_id" /> |
|
|
|
<field name="threshold_id"/> |
|
|
|
<field name="category_id"/> |
|
|
|
</group> |
|
|
|
<group> |
|
|
|
<field name="value" colspan="2"/> |
|
|
|
<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"/> |
|
|
|
<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"> |
|
|
|
<page string="Computation" groups="kpi.group_kpi_manager"> |
|
|
|
<group col="6"> |
|
|
|
<field name="periodicity" colspan="3"/> |
|
|
|
<field name="periodicity_uom" colspan="3"/> |
|
|
@ -73,7 +106,8 @@ |
|
|
|
<separator string="KPI Computation" colspan="6"/> |
|
|
|
<newline/> |
|
|
|
<field name="kpi_type" colspan="2"/> |
|
|
|
<field name="dbsource_id" colspan="2" attrs="{'invisible' : [('kpi_type', '!=', 'external')]}"/> |
|
|
|
<field name="dbsource_id" colspan="2" |
|
|
|
attrs="{'invisible' : [('kpi_type', '!=', 'external')]}"/> |
|
|
|
<newline/> |
|
|
|
<field name="kpi_code" colspan="6"/> |
|
|
|
</group> |
|
|
@ -87,12 +121,34 @@ |
|
|
|
</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_type">form</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">Key Performance Indicators</field> |
|
|
|
<field name="name">KPI Maintenance</field> |
|
|
|
<field name="res_model">kpi</field> |
|
|
|
<field name="view_type">form</field> |
|
|
|
<field name="view_mode">tree,form</field> |
|
|
|
<field name="view_id" ref="view_kpi_tree"/> |
|
|
|
<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> |
|
|
|
|
|
|
|
</odoo> |