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.

170 lines
8.4 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_names"/>
  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="default_css_style"/>
  46. <field name="css_style"/>
  47. </tree>
  48. </field>
  49. </group>
  50. </sheet>
  51. </form>
  52. </field>
  53. </record>
  54. <record model="ir.actions.act_window" id="mis_report_view_action">
  55. <field name="name">Mis report</field>
  56. <field name="view_id" ref="mis_report_view_tree"/>
  57. <field name="res_model">mis.report</field>
  58. <field name="view_type">form</field>
  59. <field name="view_mode">tree,form</field>
  60. </record>
  61. <menuitem id="mis_report_view_menu" parent="base.menu_reporting_config" name="MIS Reports" action="mis_report_view_action"/>
  62. <record id="xls_export" model="ir.actions.report.xml">
  63. <field name="name">Export report instance result</field>
  64. <field name="model">mis.report.instance</field>
  65. <field name="type">ir.actions.report.xml</field>
  66. <field name="report_name">mis.report.instance.xls</field>
  67. <field name="report_type">xls</field>
  68. <field name="auto" eval="False"/>
  69. </record>
  70. <record model="ir.ui.view" id="mis_report_instance_result_view_form">
  71. <field name="name">mis.report.instance.result.view.form</field>
  72. <field name="model">mis.report.instance</field>
  73. <field name="priority" eval="17"/>
  74. <field name="arch" type="xml">
  75. <form string="MIS Report Result" version="7.0">
  76. <widget type="mis_report"></widget>
  77. <button icon="gtk-execute" name="%(xls_export)d" string="Export" type="action" colspan="2"/>
  78. </form>
  79. </field>
  80. </record>
  81. <record model="ir.actions.act_window" id="mis_report_instance_result_action">
  82. <field name="name">Preview</field>
  83. <field name="view_id" ref="mis_report_instance_result_view_form"/>
  84. <field name="res_model">mis.report.instance</field>
  85. <field name="view_type">form</field>
  86. <field name="view_mode">form</field>
  87. <field name="target">new</field>
  88. </record>
  89. <record model="ir.ui.view" id="mis_report_instance_view_tree">
  90. <field name="name">mis.report.instance.view.tree</field>
  91. <field name="model">mis.report.instance</field>
  92. <field name="arch" type="xml">
  93. <tree string="MIS Report Instances">
  94. <field name="report_id"/>
  95. <field name="name"/>
  96. <field name="description"/>
  97. <field name="target_move"/>
  98. </tree>
  99. </field>
  100. </record>
  101. <record model="ir.ui.view" id="mis_report_instance_view_form">
  102. <field name="name">mis.report.instance.view.form</field>
  103. <field name="model">mis.report.instance</field>
  104. <field name="priority" eval="16"/>
  105. <field name="arch" type="xml">
  106. <form string="MIS Report Instance" version="7.0">
  107. <sheet>
  108. <div class="oe_title">
  109. <div class="oe_edit_only">
  110. <label for="name"/>
  111. </div>
  112. <h1>
  113. <field name="name" placeholder="Name"/>
  114. </h1>
  115. </div>
  116. <div class="oe_right oe_button_box" name="buttons">
  117. <button type="action" name="%(mis_report_instance_result_action)d" string="Preview" />
  118. <button type="action" name="%(mis_report_instance_add_to_dashboard_action)d" string="Add to dashboard" />
  119. </div>
  120. <group col="2">
  121. <field name="description"/>
  122. <field name="report_id"/>
  123. <field name="company_id" groups="base.group_multi_company"/>
  124. <field name="target_move"/>
  125. <field name="date"/>
  126. <field name="period_ids">
  127. <tree string="KPI's" editable="bottom">
  128. <field name="sequence" widget="handle"/>
  129. <field name="name"/>
  130. <field name="type"/>
  131. <field name="offset"/>
  132. <field name="duration"/>
  133. <field name="normalize_factor"/>
  134. <field name="date_from"/>
  135. <field name="date_to"/>
  136. <field name="period_from"/>
  137. <field name="period_to"/>
  138. <field name="report_instance_id" invisible="1"/>
  139. <field name="id" invisible="1"/>
  140. <field name="comparison_column_ids" domain="[('report_instance_id', '=', report_instance_id), ('id', '!=', id)]" widget="many2many_tags"/>
  141. <field name="company_id" groups="base.group_multi_company"/>
  142. </tree>
  143. </field>
  144. </group>
  145. </sheet>
  146. </form>
  147. </field>
  148. </record>
  149. <record model="ir.actions.act_window" id="mis_report_instance_view_action">
  150. <field name="name">Mis report instance</field>
  151. <field name="view_id" ref="mis_report_instance_view_tree"/>
  152. <field name="res_model">mis.report.instance</field>
  153. <field name="view_type">form</field>
  154. <field name="view_mode">tree,form</field>
  155. </record>
  156. <menuitem id="mis_report_instance_view_menu" parent="base.menu_reporting_config" name="MIS Report Instances" action="mis_report_instance_view_action"/>
  157. </data>
  158. </openerp>