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.

168 lines
8.3 KiB

10 years ago
10 years ago
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <openerp>
  3. <data>
  4. <record model="ir.ui.view" id="mis_report_view_tree">
  5. <field name="name">mis.report.view.tree</field>
  6. <field name="model">mis.report</field>
  7. <field name="arch" type="xml">
  8. <tree string="MIS Reports">
  9. <field name="name"/>
  10. <field name="description"/>
  11. </tree>
  12. </field>
  13. </record>
  14. <record model="ir.ui.view" id="mis_report_view_form">
  15. <field name="name">mis.report.view.form</field>
  16. <field name="model">mis.report</field>
  17. <field name="arch" type="xml">
  18. <form string="MIS Report" version="7.0">
  19. <sheet>
  20. <group col="2">
  21. <field name="name"/>
  22. <field name="description"/>
  23. <field name="query_ids">
  24. <tree string="Queries" editable="bottom">
  25. <field name="name"/>
  26. <field name="model_id"/>
  27. <field name="field_ids" domain="[('model_id', '=', model_id)]" widget="many2many_tags"
  28. on_change="onchange_field_ids(field_ids, context)"/>
  29. <field name="field_name"/>
  30. <field name="date_field" domain="[('model_id', '=', model_id), ('ttype', 'in', ('date', 'datetime'))]"/>
  31. <field name="domain"/>
  32. </tree>
  33. </field>
  34. <field name="kpi_ids">
  35. <tree string="KPI's" editable="bottom">
  36. <field name="sequence" widget="handle"/>
  37. <field name="description" on_change="onchange_description(description, name, context)"/>
  38. <field name="name" on_change="onchange_name(name, context)"/>
  39. <field name="expression"/>
  40. <field name="type" on_change="onchange_type(type, context)"/>
  41. <field name="dp" attrs="{'invisible': [('type', '=', 'str')]}"/>
  42. <field name="divider" attrs="{'invisible': [('type', '=', 'str')]}"/>
  43. <field name="suffix"/>
  44. <field name="compare_method" attrs="{'invisible': [('type', '=', 'str')]}"/>
  45. <field name="css_style"/>
  46. </tree>
  47. </field>
  48. </group>
  49. </sheet>
  50. </form>
  51. </field>
  52. </record>
  53. <record model="ir.actions.act_window" id="mis_report_view_action">
  54. <field name="name">Mis report</field>
  55. <field name="view_id" ref="mis_report_view_tree"/>
  56. <field name="res_model">mis.report</field>
  57. <field name="view_type">form</field>
  58. <field name="view_mode">tree,form</field>
  59. </record>
  60. <menuitem id="mis_report_view_menu" parent="base.menu_reporting_config" name="MIS Reports" action="mis_report_view_action"/>
  61. <record id="xls_export" model="ir.actions.report.xml">
  62. <field name="name">Export report instance result</field>
  63. <field name="model">mis.report.instance</field>
  64. <field name="type">ir.actions.report.xml</field>
  65. <field name="report_name">mis.report.instance.xls</field>
  66. <field name="report_type">xls</field>
  67. <field name="auto" eval="False"/>
  68. </record>
  69. <record model="ir.ui.view" id="mis_report_instance_result_view_form">
  70. <field name="name">mis.report.instance.result.view.form</field>
  71. <field name="model">mis.report.instance</field>
  72. <field name="priority" eval="17"/>
  73. <field name="arch" type="xml">
  74. <form string="MIS Report Result" version="7.0">
  75. <widget type="mis_report"></widget>
  76. <button icon="gtk-execute" name="%(xls_export)d" string="Export" type="action" colspan="2"/>
  77. </form>
  78. </field>
  79. </record>
  80. <record model="ir.actions.act_window" id="mis_report_instance_result_action">
  81. <field name="name">Preview</field>
  82. <field name="view_id" ref="mis_report_instance_result_view_form"/>
  83. <field name="res_model">mis.report.instance</field>
  84. <field name="view_type">form</field>
  85. <field name="view_mode">form</field>
  86. <field name="target">new</field>
  87. </record>
  88. <record model="ir.ui.view" id="mis_report_instance_view_tree">
  89. <field name="name">mis.report.instance.view.tree</field>
  90. <field name="model">mis.report.instance</field>
  91. <field name="arch" type="xml">
  92. <tree string="MIS Report Instances">
  93. <field name="report_id"/>
  94. <field name="name"/>
  95. <field name="description"/>
  96. <field name="target_move"/>
  97. </tree>
  98. </field>
  99. </record>
  100. <record model="ir.ui.view" id="mis_report_instance_view_form">
  101. <field name="name">mis.report.instance.view.form</field>
  102. <field name="model">mis.report.instance</field>
  103. <field name="priority" eval="16"/>
  104. <field name="arch" type="xml">
  105. <form string="MIS Report Instance" version="7.0">
  106. <sheet>
  107. <div class="oe_title">
  108. <div class="oe_edit_only">
  109. <label for="name"/>
  110. </div>
  111. <h1>
  112. <field name="name" placeholder="Name"/>
  113. </h1>
  114. </div>
  115. <div class="oe_right oe_button_box" name="buttons">
  116. <button type="action" name="%(mis_report_instance_result_action)d" string="Preview" />
  117. <button type="action" name="%(mis_report_instance_add_to_dashboard_action)d" string="Add to dashboard" />
  118. </div>
  119. <group col="2">
  120. <field name="description"/>
  121. <field name="report_id"/>
  122. <field name="target_move"/>
  123. <field name="date"/>
  124. <field name="period_ids">
  125. <tree string="KPI's" editable="bottom">
  126. <field name="sequence" widget="handle"/>
  127. <field name="name"/>
  128. <field name="type"/>
  129. <field name="offset"/>
  130. <field name="duration"/>
  131. <field name="normalize_factor"/>
  132. <field name="date_from"/>
  133. <field name="date_to"/>
  134. <field name="period_from"/>
  135. <field name="period_to"/>
  136. <field name="report_instance_id" invisible="1"/>
  137. <field name="id" invisible="1"/>
  138. <field name="comparison_column_ids" domain="[('report_instance_id', '=', report_instance_id), ('id', '!=', id)]" widget="many2many_tags"/>
  139. <field name="company_id" groups="base.group_multi_company"/>
  140. </tree>
  141. </field>
  142. </group>
  143. </sheet>
  144. </form>
  145. </field>
  146. </record>
  147. <record model="ir.actions.act_window" id="mis_report_instance_view_action">
  148. <field name="name">Mis report instance</field>
  149. <field name="view_id" ref="mis_report_instance_view_tree"/>
  150. <field name="res_model">mis.report.instance</field>
  151. <field name="view_type">form</field>
  152. <field name="view_mode">tree,form</field>
  153. </record>
  154. <menuitem id="mis_report_instance_view_menu" parent="base.menu_reporting_config" name="MIS Report Instances" action="mis_report_instance_view_action"/>
  155. </data>
  156. </openerp>