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.

291 lines
13 KiB

12 years ago
12 years ago
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <!-- KPI -->
  5. <record id="view_mgmtsystem_kpi_tree" model="ir.ui.view">
  6. <field name="name">mgmtsystem.kpi.tree</field>
  7. <field name="model">mgmtsystem.kpi</field>
  8. <field name="arch" type="xml">
  9. <tree string="Key Performance Indicators">
  10. <field name="name"/>
  11. <field name="value" widget="progressbar"/>
  12. <field name="category_id"/>
  13. <field name="kpi_type"/>
  14. </tree>
  15. </field>
  16. </record>
  17. <record id="view_mgmtsystem_kpi_filter" model="ir.ui.view">
  18. <field name="name">mgmtsystem.kpi.filter</field>
  19. <field name="model">mgmtsystem.kpi</field>
  20. <field name="arch" type="xml">
  21. <search string="KPI">
  22. <group>
  23. <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."/>
  24. <separator orientation="vertical"/>
  25. <field name="name"/>
  26. <field name="category_id"/>
  27. </group>
  28. <newline />
  29. <group expand="0" string="Group By...">
  30. <filter string="Category" context="{'group_by':'category_id'}"/>
  31. <filter string="Type" context="{'group_by':'kpi_type'}"/>
  32. </group>
  33. </search>
  34. </field>
  35. </record>
  36. <record id="view_mgmtsystem_kpi_form" model="ir.ui.view">
  37. <field name="name">mgmtsystem.kpi.form</field>
  38. <field name="model">mgmtsystem.kpi</field>
  39. <field name="arch" type="xml">
  40. <form string="Key Performance Indicator">
  41. <group col="6" colspan="6">
  42. <field name="name" colspan="2"/>
  43. <field name="threshold_id" colspan="2"/>
  44. <field name="category_id" colspan="2"/>
  45. <newline/>
  46. <field name="value" colspan="2"/>
  47. <button name="compute_kpi_value" string="Compute KPI Now" colspan="2" type="object"/>
  48. <field name="active" colspan="2"/>
  49. </group>
  50. <notebook colspan="6">
  51. <page string="History">
  52. <field name="history_ids" readonly="1" nolabel="1"/>
  53. </page>
  54. <page string="Computation">
  55. <group col="6">
  56. <field name="periodicity" colspan="2"/>
  57. <field name="periodicity_uom" colspan="2"/>
  58. <field name="next_execution_date" colspan="2"/>
  59. <separator string="KPI Computation" colspan="6"/>
  60. <newline/>
  61. <field name="kpi_type" colspan="2"/>
  62. <field name="dbsource_id" colspan="2" attrs="{'invisible' : [('kpi_type', '!=', 'external')]}"/>
  63. <newline/>
  64. <field name="kpi_code" colspan="6"/>
  65. </group>
  66. </page>
  67. <page string="Description">
  68. <field name="description" nolabel="1"/>
  69. </page>
  70. </notebook>
  71. </form>
  72. </field>
  73. </record>
  74. <record model="ir.actions.act_window" id="open_mgmtsystem_kpi_list">
  75. <field name="name">Key Performance Indicators</field>
  76. <field name="res_model">mgmtsystem.kpi</field>
  77. <field name="view_type">form</field>
  78. <field name="view_mode">tree,form</field>
  79. <field name="view_id" ref="view_mgmtsystem_kpi_tree"/>
  80. <field name="search_view_id" ref="view_mgmtsystem_kpi_filter"/>
  81. </record>
  82. <menuitem id="menu_mgmtsystem_kpi"
  83. name="KPI"
  84. action="open_mgmtsystem_kpi_list"
  85. sequence="15"
  86. parent="mgmtsystem.menu_mgmtsystem_main"
  87. groups="base.group_user"/>
  88. <!-- KPI history -->
  89. <record id="view_mgmtsystem_kpi_history_tree" model="ir.ui.view">
  90. <field name="name">mgmtsystem.kpi.history.tree</field>
  91. <field name="model">mgmtsystem.kpi.history</field>
  92. <field name="arch" type="xml">
  93. <tree string="KPI History">
  94. <field name="name"/>
  95. <field name="date"/>
  96. <field name="value"/>
  97. <field name="color" widget="color"/>
  98. </tree>
  99. </field>
  100. </record>
  101. <!-- Configuration menu -->
  102. <menuitem id="menu_mgmtsystem_configuration_kpi"
  103. name="KPI"
  104. parent="mgmtsystem.menu_mgmtsystem_configuration"
  105. groups="mgmtsystem.group_mgmtsystem_manager"
  106. sequence="20"/>
  107. <!-- Categories -->
  108. <record id="view_mgmtsystem_kpi_category_tree" model="ir.ui.view">
  109. <field name="name">mgmtsystem.kpi.category.tree</field>
  110. <field name="model">mgmtsystem.kpi.category</field>
  111. <field name="arch" type="xml">
  112. <tree string="Categories">
  113. <field name="name"/>
  114. </tree>
  115. </field>
  116. </record>
  117. <record id="view_mgmtsystem_kpi_category_form" model="ir.ui.view">
  118. <field name="name">mgmtsystem.kpi.category.form</field>
  119. <field name="model">mgmtsystem.kpi.category</field>
  120. <field name="arch" type="xml">
  121. <form string="Category">
  122. <field name="name"/>
  123. <newline/>
  124. <field name="description" colspan="4"/>
  125. </form>
  126. </field>
  127. </record>
  128. <record model="ir.actions.act_window" id="open_mgmtsystem_category_list">
  129. <field name="name">Categories</field>
  130. <field name="res_model">mgmtsystem.kpi.category</field>
  131. <field name="view_type">form</field>
  132. <field name="view_mode">tree,form</field>
  133. <field name="view_id" ref="view_mgmtsystem_kpi_category_tree"/>
  134. </record>
  135. <menuitem id="menu_mgmtsystem_configuration_kpi_category"
  136. name="Categories"
  137. action="open_mgmtsystem_category_list"
  138. parent="menu_mgmtsystem_configuration_kpi"
  139. groups="mgmtsystem.group_mgmtsystem_manager"
  140. sequence="10"/>
  141. <!-- Thresholds -->
  142. <record id="view_mgmtsystem_kpi_threshold_tree" model="ir.ui.view">
  143. <field name="name">mgmtsystem.kpi.threshold.tree</field>
  144. <field name="model">mgmtsystem.kpi.threshold</field>
  145. <field name="arch" type="xml">
  146. <tree string="Thresholds">
  147. <field name="name"/>
  148. <field name="invalid_message"/>
  149. </tree>
  150. </field>
  151. </record>
  152. <record id="view_mgmtsystem_kpi_threshold_form" model="ir.ui.view">
  153. <field name="name">mgmtsystem.kpi.threshold.form</field>
  154. <field name="model">mgmtsystem.kpi.threshold</field>
  155. <field name="arch" type="xml">
  156. <form string="Threshold">
  157. <field name="name"/>
  158. <newline/>
  159. <separator string="Ranges" colspan="2"/>
  160. <newline/>
  161. <field name="range_ids" nolabel="1" colspan="2"/>
  162. <newline/>
  163. <separator string="KPIs" colspan="2"/>
  164. <newline/>
  165. <field name="kpi_ids" nolabel="1" colspan="2"/>
  166. <newline/>
  167. <field name="invalid_message" nolabel="1" attrs="{'invisible' : [('invalid_message', '=', '')]}" colspan="2"/>
  168. </form>
  169. </field>
  170. </record>
  171. <record model="ir.actions.act_window" id="open_mgmtsystem_threshold_list">
  172. <field name="name">Thresholds</field>
  173. <field name="res_model">mgmtsystem.kpi.threshold</field>
  174. <field name="view_type">form</field>
  175. <field name="view_mode">tree,form</field>
  176. <field name="view_id" ref="view_mgmtsystem_kpi_threshold_tree"/>
  177. </record>
  178. <menuitem id="menu_mgmtsystem_configuration_kpi_threshold"
  179. name="Thresholds"
  180. action="open_mgmtsystem_threshold_list"
  181. parent="menu_mgmtsystem_configuration_kpi"
  182. groups="mgmtsystem.group_mgmtsystem_manager"
  183. sequence="10"/>
  184. <!-- Ranges -->
  185. <record id="view_mgmtsystem_kpi_threshold_range_tree" model="ir.ui.view">
  186. <field name="name">mgmtsystem.kpi.threshold.range.tree</field>
  187. <field name="model">mgmtsystem.kpi.threshold.range</field>
  188. <field name="arch" type="xml">
  189. <tree string="Ranges">
  190. <field name="name"/>
  191. <field name="min_value"/>
  192. <field name="max_value"/>
  193. <field name="color" widget="color"/>
  194. <field name="invalid_message"/>
  195. </tree>
  196. </field>
  197. </record>
  198. <record id="view_mgmtsystem_kpi_threshold_range_form" model="ir.ui.view">
  199. <field name="name">mgmtsystem.kpi.threshold.range.form</field>
  200. <field name="model">mgmtsystem.kpi.threshold.range</field>
  201. <field name="arch" type="xml">
  202. <form string="Range">
  203. <field name="name"/>
  204. <field name="color"/>
  205. <newline/>
  206. <separator string="Minimum" colspan="4"/>
  207. <newline/>
  208. <field name="min_type"/>
  209. <field name="min_fixed_value" attrs="{'invisible' : [('min_type', '!=', 'static')]}"/>
  210. <field name="min_dbsource_id" attrs="{'invisible' : [('min_type', '!=', 'external')]}"/>
  211. <newline/>
  212. <field name="min_code" colspan="4" attrs="{'invisible' : [('min_type', 'NOT IN', ('local','external','python'))]}"/>
  213. <newline/>
  214. <separator string="Maximum" colspan="4"/>
  215. <newline/>
  216. <field name="max_type"/>
  217. <field name="max_fixed_value" attrs="{'invisible' : [('max_type', '!=', 'static')]}"/>
  218. <field name="max_dbsource_id" attrs="{'invisible' : [('max_type', '!=', 'external')]}"/>
  219. <newline/>
  220. <field name="max_code" colspan="4" attrs="{'invisible' : [('max_type', 'NOT IN', ('local','external','python'))]}"/>
  221. <newline/>
  222. <separator string="Thresholds" colspan="4"/>
  223. <field name="threshold_ids" nolabel="1" colspan="4"/>
  224. <field name="invalid_message" nolabel="1" attrs="{'invisible' : [('invalid_message', '=', '')]}" colspan="4"/>
  225. </form>
  226. </field>
  227. </record>
  228. <record model="ir.actions.act_window" id="open_mgmtsystem_threshold_range_list">
  229. <field name="name">Ranges</field>
  230. <field name="res_model">mgmtsystem.kpi.threshold.range</field>
  231. <field name="view_type">form</field>
  232. <field name="view_mode">tree,form</field>
  233. <field name="view_id" ref="view_mgmtsystem_kpi_threshold_range_tree"/>
  234. </record>
  235. <menuitem id="menu_mgmtsystem_configuration_kpi_range"
  236. name="Ranges"
  237. action="open_mgmtsystem_threshold_range_list"
  238. parent="menu_mgmtsystem_configuration_kpi"
  239. groups="mgmtsystem.group_mgmtsystem_manager"
  240. sequence="20"/>
  241. <menuitem id="menu_mgmtsystem_configuration_kpi_dbsource"
  242. name="Data Sources"
  243. action="base_external_dbsource.action_dbsource"
  244. parent="menu_mgmtsystem_configuration_kpi"
  245. groups="mgmtsystem.group_mgmtsystem_manager"
  246. sequence="20"/>
  247. </data>
  248. <data noupdate="1">
  249. <record forcecreate="True" id="ir_cron_mgmtsystem_kpi_action" model="ir.cron">
  250. <field name="name">Update KPI values</field>
  251. <field name="user_id" ref="base.user_root"/>
  252. <field name="interval_number">1</field>
  253. <field name="interval_type">hours</field>
  254. <field name="numbercall">-1</field>
  255. <field eval="False" name="doall"/>
  256. <field eval="'mgmtsystem.kpi'" name="model"/>
  257. <field eval="'update_kpi_value'" name="function"/>
  258. <field eval="'()'" name="args"/>
  259. </record>
  260. </data>
  261. </openerp>