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.

205 lines
11 KiB

  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_instance_result_view_form">
  11. <field name="name">mis.report.instance.result.view.form</field>
  12. <field name="model">mis.report.instance</field>
  13. <field name="priority" eval="20 "/>
  14. <field name="arch" type="xml">
  15. <form string="MIS Report Result" version="7.0" edit="false" create="false" delete="false" >
  16. <widget type="mis_report"></widget>
  17. </form>
  18. </field>
  19. </record>
  20. <record model="ir.ui.view" id="mis_report_instance_view_tree">
  21. <field name="name">mis.report.instance.view.tree</field>
  22. <field name="model">mis.report.instance</field>
  23. <field name="arch" type="xml">
  24. <tree string="MIS Report Instances">
  25. <button name="preview" type="object" icon="gtk-print-preview" />
  26. <button type="object" name="print_pdf" string="Print" icon="gtk-print" />
  27. <button type="object" name="export_xls" string="Export" icon="gtk-go-down" />
  28. <field name="name"/>
  29. <field name="report_id" string="Template"/>
  30. <field name="company_id" groups="base.group_multi_company"/>
  31. <field name="target_move"/>
  32. <field name="pivot_date"/>
  33. </tree>
  34. </field>
  35. </record>
  36. <record model="ir.ui.view" id="mis_report_instance_view_form">
  37. <field name="name">mis.report.instance.view.form</field>
  38. <field name="model">mis.report.instance</field>
  39. <field name="priority" eval="15"/>
  40. <field name="arch" type="xml">
  41. <form string="MIS Report Instance" version="7.0">
  42. <sheet>
  43. <field name="temporary" invisible="1"/>
  44. <div class="oe_read_only oe_right oe_button_box" name="buttons">
  45. <button type="object" name="preview" string="Preview" icon="gtk-print-preview" />
  46. <button type="object" name="print_pdf" string="Print" icon="gtk-print" />
  47. <button type="object" name="export_xls" string="Export" icon="gtk-go-down" />
  48. <button type="action" name="%(mis_report_instance_add_to_dashboard_action)d" string="Add to dashboard" icon="gtk-add" attrs="{'invisible': [('temporary', '=', True)]}"/>
  49. <button type="object" name="save_report" string="Save" icon="gtk-floppy" attrs="{'invisible': [('temporary', '=', False)]}"/>
  50. </div>
  51. <div class="oe_title">
  52. <div class="oe_edit_only">
  53. <label for="name"/>
  54. </div>
  55. <h1>
  56. <field name="name" placeholder="Name"/>
  57. </h1>
  58. <field name="description"/>
  59. </div>
  60. <group>
  61. <group>
  62. <field name="report_id" string="Template"/>
  63. <field name="company_id" groups="base.group_multi_company"/>
  64. <field name="target_move" widget="radio"/>
  65. <field name="landscape_pdf"/>
  66. <field name="comparison_mode"/>
  67. </group>
  68. <group>
  69. <group name="simple_mode"
  70. attrs="{'invisible': [('comparison_mode', '=', True)]}" colspan="4">
  71. <field name="date_range_id"/>
  72. <field name="date_from" attrs="{'required': [('comparison_mode', '=', False)]}"/>
  73. <field name="date_to" attrs="{'required': [('comparison_mode', '=', False)]}"/>
  74. </group>
  75. </group>
  76. </group>
  77. <group name="comparison_mode" string="Comparison"
  78. attrs="{'invisible': [('comparison_mode', '=', False)]}" colspan="4">
  79. <field name="period_ids" colspan="4" nolabel="1" attrs="{'required': [('comparison_mode', '=', True)]}">
  80. <tree string="KPI's" colors="red:valid==False">
  81. <field name="sequence" widget="handle"/>
  82. <field name="name"/>
  83. <field name="date_from"/>
  84. <field name="date_to"/>
  85. <field name="valid" invisible="1"/>
  86. <field name="report_instance_id" invisible="1"/>
  87. <field name="id" invisible="1"/>
  88. <field name="subkpi_ids"
  89. domain="[('report_id', '=', parent.report_id)]"
  90. widget="many2many_tags"/>
  91. <field name="comparison_column_ids" domain="[('report_instance_id', '=', report_instance_id), ('id', '!=', id)]" widget="many2many_tags"/>
  92. </tree>
  93. </field>
  94. <field name="date"/>
  95. </group>
  96. </sheet>
  97. </form>
  98. </field>
  99. </record>
  100. <record model="ir.actions.act_window" id="mis_report_instance_view_action">
  101. <field name="name">MIS Reports</field>
  102. <field name="view_id" ref="mis_report_instance_view_tree"/>
  103. <field name="res_model">mis.report.instance</field>
  104. <field name="view_type">form</field>
  105. <field name="view_mode">tree,form</field>
  106. <field name="domain">[('temporary', '=', False)]</field>
  107. </record>
  108. <menuitem id="mis_report_finance_menu" parent="account.menu_finance_reports" name="MIS Reporting" sequence="101"/>
  109. <menuitem id="mis_report_instance_view_menu" parent="mis_report_finance_menu" name="MIS Reports" action="mis_report_instance_view_action" sequence="10"/>
  110. <record id="wizard_mis_report_instance_view_form" model="ir.ui.view">
  111. <field name="model">mis.report.instance</field>
  112. <field name="inherit_id" ref="mis_builder.mis_report_instance_view_form"/>
  113. <field name="mode">primary</field>
  114. <field name="arch" type="xml">
  115. <field name="name" position="attributes">
  116. <attribute name="readonly">1</attribute>
  117. </field>
  118. <label for="name" position="replace"/>
  119. <field name="report_id" position="attributes">
  120. <attribute name="invisible">1</attribute>
  121. </field>
  122. <div name="buttons" position="attributes">
  123. <attribute name="invisible">1</attribute>
  124. </div>
  125. <sheet position="after">
  126. <footer>
  127. <button type="object" name="save_report" string="Save" icon="gtk-floppy"/>
  128. <button type="object" name="preview" string="Preview" icon="gtk-print-preview" />
  129. <button type="object" name="print_pdf" string="Print" icon="gtk-print" />
  130. <button type="object" name="export_xls" string="Export" icon="gtk-go-down" />
  131. or <button string="Cancel" class="oe_link" special="cancel" />
  132. </footer>
  133. </sheet>
  134. </field>
  135. </record>
  136. <record model="ir.actions.act_window" id="last_mis_report_instance_view_action">
  137. <field name="name">Last Reports Generated</field>
  138. <field name="view_id" ref="mis_report_instance_view_tree"/>
  139. <field name="res_model">mis.report.instance</field>
  140. <field name="view_type">form</field>
  141. <field name="view_mode">tree,form</field>
  142. <field name="domain">[('temporary', '=', True)]</field>
  143. </record>
  144. <menuitem id="last_wizard_mis_report_instance_view_menu"
  145. parent="mis_report_finance_menu"
  146. name="Last Reports Generated"
  147. action="last_mis_report_instance_view_action"
  148. sequence="20"/>
  149. <record model="ir.ui.view" id="mis_report_instance_period_view_form">
  150. <field name="model">mis.report.instance.period</field>
  151. <field name="priority" eval="16"/>
  152. <field name="arch" type="xml">
  153. <form string="KPI's">
  154. <sheet>
  155. <group>
  156. <field name="mode" widget="radio"/>
  157. <field name="valid" invisible="1"/>
  158. <group name="relative" attrs="{'invisible': [('mode', '!=', 'relative')]}" colspan="4">
  159. <group>
  160. <field name="type" attrs="{'required': [('mode', '=', 'relative')]}"/>
  161. <field name="date_range_type_id"
  162. attrs="{'invisible': [('type', '!=', 'date_range')], 'required': [('type', '=', 'date_range')]}"/>
  163. <field name="offset"/>
  164. <field name="duration"/>
  165. </group>
  166. <group>
  167. <field name="date_from"/>
  168. <field name="date_to"/>
  169. </group>
  170. </group>
  171. <group name="fix" attrs="{'invisible': [('mode', '!=', 'fix')]}" colspan="4">
  172. <field name="date_range_id"/>
  173. <field name="manual_date_from"
  174. attrs="{'required': [('mode', '=', 'fix')]}"/>
  175. <field name="manual_date_to"
  176. attrs="{'required': [('mode', '=', 'fix')]}"/>
  177. </group>
  178. <field name="name" placeholder="Name"/>
  179. <field name="normalize_factor"/>
  180. <field name="report_instance_id" invisible="1"/>
  181. <field name="id" invisible="1"/>
  182. <field name="subkpi_ids"
  183. domain="[('report_id', '=', parent.report_id)]"
  184. widget="many2many_tags"/>
  185. <field name="comparison_column_ids"
  186. domain="[('report_instance_id', '=', report_instance_id), ('id', '!=', id)]"
  187. widget="many2many_tags"/>
  188. </group>
  189. </sheet>
  190. </form>
  191. </field>
  192. </record>
  193. </data>
  194. </openerp>