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.

97 lines
4.5 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. <group col="6" colspan="6">
  50. <field name="name" colspan="2"/>
  51. <field name="threshold_id" colspan="2"/>
  52. <field name="category_id" colspan="2"/>
  53. <newline/>
  54. <field name="value" colspan="2"/>
  55. <button name="compute_kpi_value" string="Compute KPI Now" colspan="2" type="object"/>
  56. <field name="active" colspan="2"/>
  57. <field name="company_id" groups="base.group_multi_company"/>
  58. </group>
  59. <notebook colspan="6">
  60. <page string="History">
  61. <field name="history_ids" readonly="1" nolabel="1"/>
  62. </page>
  63. <page string="Computation">
  64. <group col="6">
  65. <field name="periodicity" colspan="2"/>
  66. <field name="periodicity_uom" colspan="2"/>
  67. <field name="next_execution_date" colspan="2"/>
  68. <separator string="KPI Computation" colspan="6"/>
  69. <newline/>
  70. <field name="kpi_type" colspan="2"/>
  71. <field name="dbsource_id" colspan="2" attrs="{'invisible' : [('kpi_type', '!=', 'external')]}"/>
  72. <newline/>
  73. <field name="kpi_code" colspan="6"/>
  74. </group>
  75. </page>
  76. <page string="Description">
  77. <field name="description" nolabel="1"/>
  78. </page>
  79. </notebook>
  80. </form>
  81. </field>
  82. </record>
  83. <record model="ir.actions.act_window" id="open_kpi_list">
  84. <field name="name">Key Performance Indicators</field>
  85. <field name="res_model">kpi</field>
  86. <field name="view_type">form</field>
  87. <field name="view_mode">tree,form</field>
  88. <field name="view_id" ref="view_kpi_tree"/>
  89. <field name="search_view_id" ref="view_kpi_filter"/>
  90. </record>
  91. </data>
  92. </odoo>