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.

301 lines
13 KiB

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