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.

300 lines
14 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="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. <field name="company_id" group="base.group_multi_company"/>
  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="arch" type="xml">
  22. <search string="KPI">
  23. <group>
  24. <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."/>
  25. <separator orientation="vertical"/>
  26. <field name="name"/>
  27. <field name="category_id"/>
  28. <field name="company_id" group="base.group_multi_company"/>
  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="arch" type="xml">
  42. <form string="Key Performance Indicator">
  43. <group col="6" colspan="6">
  44. <field name="name" colspan="2"/>
  45. <field name="threshold_id" colspan="2"/>
  46. <field name="category_id" colspan="2"/>
  47. <newline/>
  48. <field name="value" colspan="2"/>
  49. <button name="compute_kpi_value" string="Compute KPI Now" colspan="2" type="object"/>
  50. <field name="active" colspan="2"/>
  51. <field name="company_id" group="base.group_multi_company"/>
  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="arch" type="xml">
  96. <tree string="KPI History">
  97. <field name="name"/>
  98. <field name="date"/>
  99. <field name="value"/>
  100. <field name="color" widget="color"/>
  101. <field name="company_id" group="base.group_multi_company"/>
  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="arch" type="xml">
  116. <tree string="Categories">
  117. <field name="name"/>
  118. </tree>
  119. </field>
  120. </record>
  121. <record id="view_mgmtsystem_kpi_category_form" model="ir.ui.view">
  122. <field name="name">mgmtsystem.kpi.category.form</field>
  123. <field name="model">mgmtsystem.kpi.category</field>
  124. <field name="arch" type="xml">
  125. <form string="Category">
  126. <field name="name"/>
  127. <newline/>
  128. <field name="description" colspan="4"/>
  129. </form>
  130. </field>
  131. </record>
  132. <record model="ir.actions.act_window" id="open_mgmtsystem_category_list">
  133. <field name="name">Categories</field>
  134. <field name="res_model">mgmtsystem.kpi.category</field>
  135. <field name="view_type">form</field>
  136. <field name="view_mode">tree,form</field>
  137. <field name="view_id" ref="view_mgmtsystem_kpi_category_tree"/>
  138. </record>
  139. <menuitem id="menu_mgmtsystem_configuration_kpi_category"
  140. name="Categories"
  141. action="open_mgmtsystem_category_list"
  142. parent="menu_mgmtsystem_configuration_kpi"
  143. groups="mgmtsystem.group_mgmtsystem_manager"
  144. sequence="10"/>
  145. <!-- Thresholds -->
  146. <record id="view_mgmtsystem_kpi_threshold_tree" model="ir.ui.view">
  147. <field name="name">mgmtsystem.kpi.threshold.tree</field>
  148. <field name="model">mgmtsystem.kpi.threshold</field>
  149. <field name="arch" type="xml">
  150. <tree string="Thresholds">
  151. <field name="name"/>
  152. <field name="invalid_message"/>
  153. <field name="company_id" group="base.group_multi_company"/>
  154. </tree>
  155. </field>
  156. </record>
  157. <record id="view_mgmtsystem_kpi_threshold_form" model="ir.ui.view">
  158. <field name="name">mgmtsystem.kpi.threshold.form</field>
  159. <field name="model">mgmtsystem.kpi.threshold</field>
  160. <field name="arch" type="xml">
  161. <form string="Threshold">
  162. <field name="name"/>
  163. <newline/>
  164. <separator string="Ranges" colspan="2"/>
  165. <newline/>
  166. <field name="range_ids" nolabel="1" colspan="2"/>
  167. <newline/>
  168. <separator string="KPIs" colspan="2"/>
  169. <newline/>
  170. <field name="kpi_ids" nolabel="1" colspan="2"/>
  171. <newline/>
  172. <field name="invalid_message" nolabel="1" attrs="{'invisible' : [('invalid_message', '=', '')]}" colspan="2"/>
  173. <newline/>
  174. <field name="company_id" group="base.group_multi_company"/>
  175. </form>
  176. </field>
  177. </record>
  178. <record model="ir.actions.act_window" id="open_mgmtsystem_threshold_list">
  179. <field name="name">Thresholds</field>
  180. <field name="res_model">mgmtsystem.kpi.threshold</field>
  181. <field name="view_type">form</field>
  182. <field name="view_mode">tree,form</field>
  183. <field name="view_id" ref="view_mgmtsystem_kpi_threshold_tree"/>
  184. </record>
  185. <menuitem id="menu_mgmtsystem_configuration_kpi_threshold"
  186. name="Thresholds"
  187. action="open_mgmtsystem_threshold_list"
  188. parent="menu_mgmtsystem_configuration_kpi"
  189. groups="mgmtsystem.group_mgmtsystem_manager"
  190. sequence="10"/>
  191. <!-- Ranges -->
  192. <record id="view_mgmtsystem_kpi_threshold_range_tree" model="ir.ui.view">
  193. <field name="name">mgmtsystem.kpi.threshold.range.tree</field>
  194. <field name="model">mgmtsystem.kpi.threshold.range</field>
  195. <field name="arch" type="xml">
  196. <tree string="Ranges">
  197. <field name="name"/>
  198. <field name="min_value"/>
  199. <field name="max_value"/>
  200. <field name="color" widget="color"/>
  201. <field name="invalid_message"/>
  202. <field name="company_id" group="base.group_multi_company"/>
  203. </tree>
  204. </field>
  205. </record>
  206. <record id="view_mgmtsystem_kpi_threshold_range_form" model="ir.ui.view">
  207. <field name="name">mgmtsystem.kpi.threshold.range.form</field>
  208. <field name="model">mgmtsystem.kpi.threshold.range</field>
  209. <field name="arch" type="xml">
  210. <form string="Range">
  211. <field name="name"/>
  212. <field name="color"/>
  213. <field name="company_id" group="base.group_multi_company"/>
  214. <newline/>
  215. <separator string="Minimum" colspan="4"/>
  216. <newline/>
  217. <field name="min_type"/>
  218. <field name="min_fixed_value" attrs="{'invisible' : [('min_type', '!=', 'static')]}"/>
  219. <field name="min_dbsource_id" attrs="{'invisible' : [('min_type', '!=', 'external')]}"/>
  220. <newline/>
  221. <field name="min_code" colspan="4" attrs="{'invisible' : [('min_type', 'NOT IN', ('local','external','python'))]}"/>
  222. <newline/>
  223. <separator string="Maximum" colspan="4"/>
  224. <newline/>
  225. <field name="max_type"/>
  226. <field name="max_fixed_value" attrs="{'invisible' : [('max_type', '!=', 'static')]}"/>
  227. <field name="max_dbsource_id" attrs="{'invisible' : [('max_type', '!=', 'external')]}"/>
  228. <newline/>
  229. <field name="max_code" colspan="4" attrs="{'invisible' : [('max_type', 'NOT IN', ('local','external','python'))]}"/>
  230. <newline/>
  231. <separator string="Thresholds" colspan="4"/>
  232. <field name="threshold_ids" nolabel="1" colspan="4"/>
  233. <field name="invalid_message" nolabel="1" attrs="{'invisible' : [('invalid_message', '=', '')]}" colspan="4"/>
  234. </form>
  235. </field>
  236. </record>
  237. <record model="ir.actions.act_window" id="open_mgmtsystem_threshold_range_list">
  238. <field name="name">Ranges</field>
  239. <field name="res_model">mgmtsystem.kpi.threshold.range</field>
  240. <field name="view_type">form</field>
  241. <field name="view_mode">tree,form</field>
  242. <field name="view_id" ref="view_mgmtsystem_kpi_threshold_range_tree"/>
  243. </record>
  244. <menuitem id="menu_mgmtsystem_configuration_kpi_range"
  245. name="Ranges"
  246. action="open_mgmtsystem_threshold_range_list"
  247. parent="menu_mgmtsystem_configuration_kpi"
  248. groups="mgmtsystem.group_mgmtsystem_manager"
  249. sequence="20"/>
  250. <menuitem id="menu_mgmtsystem_configuration_kpi_dbsource"
  251. name="Data Sources"
  252. action="base_external_dbsource.action_dbsource"
  253. parent="menu_mgmtsystem_configuration_kpi"
  254. groups="mgmtsystem.group_mgmtsystem_manager"
  255. sequence="20"/>
  256. </data>
  257. <data noupdate="1">
  258. <record forcecreate="True" id="ir_cron_mgmtsystem_kpi_action" model="ir.cron">
  259. <field name="name">Update KPI values</field>
  260. <field name="user_id" ref="base.user_root"/>
  261. <field name="interval_number">1</field>
  262. <field name="interval_type">hours</field>
  263. <field name="numbercall">-1</field>
  264. <field eval="False" name="doall"/>
  265. <field eval="'mgmtsystem.kpi'" name="model"/>
  266. <field eval="'update_kpi_value'" name="function"/>
  267. <field eval="'()'" name="args"/>
  268. </record>
  269. </data>
  270. </openerp>