You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
4.7 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- Copyright 2012 - Now Savoir-faire Linux <https://www.savoirfairelinux.com/>
  3. License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
  4. <odoo>
  5. <data>
  6. <!-- KPI -->
  7. <record id="view_kpi_tree" model="ir.ui.view">
  8. <field name="name">kpi.tree</field>
  9. <field name="model">kpi</field>
  10. <field name="arch" type="xml">
  11. <tree string="Key Performance Indicators">
  12. <field name="name"/>
  13. <field name="value" widget="progressbar"/>
  14. <field name="category_id"/>
  15. <field name="kpi_type"/>
  16. <field name="company_id" groups="base.group_multi_company"/>
  17. </tree>
  18. </field>
  19. </record>
  20. <record id="view_kpi_filter" model="ir.ui.view">
  21. <field name="name">kpi.filter</field>
  22. <field name="model">kpi</field>
  23. <field name="arch" type="xml">
  24. <search string="KPI">
  25. <group>
  26. <filter name="active"
  27. icon="terp-document-new"
  28. domain="[('active','=',True)]"
  29. string="Active"
  30. help="Only active KPIs are computed by the scheduler based on the periodicity configuration."/>
  31. <separator orientation="vertical"/>
  32. <field name="name"/>
  33. <field name="category_id"/>
  34. <field name="company_id" group="base.group_multi_company"/>
  35. </group>
  36. <newline/>
  37. <group expand="0" string="Group By...">
  38. <filter string="Category" context="{'group_by':'category_id'}"/>
  39. <filter string="Type" context="{'group_by':'kpi_type'}"/>
  40. </group>
  41. </search>
  42. </field>
  43. </record>
  44. <record id="view_kpi_form" model="ir.ui.view">
  45. <field name="name">kpi.form</field>
  46. <field name="model">kpi</field>
  47. <field name="arch" type="xml">
  48. <form string="Key Performance Indicator">
  49. <sheet>
  50. <group col="6" colspan="6">
  51. <field name="name" colspan="2"/>
  52. <field name="threshold_id" colspan="2"/>
  53. <field name="category_id" colspan="2"/>
  54. <newline/>
  55. <field name="value" colspan="2"/>
  56. <button name="compute_kpi_value" string="Compute KPI Now" colspan="2" type="object"/>
  57. <field name="active" colspan="2"/>
  58. <field name="company_id" groups="base.group_multi_company"/>
  59. </group>
  60. <notebook colspan="6">
  61. <page string="History">
  62. <field name="history_ids" readonly="1" nolabel="1"/>
  63. </page>
  64. <page string="Computation">
  65. <group col="6">
  66. <field name="periodicity" colspan="2"/>
  67. <field name="periodicity_uom" colspan="2"/>
  68. <field name="next_execution_date" colspan="2"/>
  69. <separator string="KPI Computation" colspan="6"/>
  70. <newline/>
  71. <field name="kpi_type" colspan="2"/>
  72. <field name="dbsource_id" colspan="2" attrs="{'invisible' : [('kpi_type', '!=', 'external')]}"/>
  73. <newline/>
  74. <field name="kpi_code" colspan="6"/>
  75. </group>
  76. </page>
  77. <page string="Description">
  78. <field name="description" nolabel="1"/>
  79. </page>
  80. </notebook>
  81. </sheet>
  82. </form>
  83. </field>
  84. </record>
  85. <record model="ir.actions.act_window" id="open_kpi_list">
  86. <field name="name">Key Performance Indicators</field>
  87. <field name="res_model">kpi</field>
  88. <field name="view_type">form</field>
  89. <field name="view_mode">tree,form</field>
  90. <field name="view_id" ref="view_kpi_tree"/>
  91. <field name="search_view_id" ref="view_kpi_filter"/>
  92. </record>
  93. </data>
  94. </odoo>