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.

180 lines
9.0 KiB

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