OCA reporting engine fork for dev and update.
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.

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