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="description"/>
  30. <field name="report_id"/>
  31. <field name="target_move"/>
  32. <field name="pivot_date"/>
  33. <field name="company_id"/>
  34. </tree>
  35. </field>
  36. </record>
  37. <record model="ir.ui.view" id="mis_report_instance_view_form">
  38. <field name="name">mis.report.instance.view.form</field>
  39. <field name="model">mis.report.instance</field>
  40. <field name="priority" eval="15"/>
  41. <field name="arch" type="xml">
  42. <form string="MIS Report Instance" version="7.0">
  43. <sheet>
  44. <field name="temporary" invisible="1"/>
  45. <div class="oe_right oe_button_box" name="buttons">
  46. <button type="object" name="preview" string="Preview" icon="gtk-print-preview" />
  47. <button type="object" name="print_pdf" string="Print" icon="gtk-print" />
  48. <button type="object" name="export_xls" string="Export" icon="gtk-go-down" />
  49. <button type="action" name="%(mis_report_instance_add_to_dashboard_action)d" string="Add to dashboard" icon="gtk-add" attrs="{'invisible': [('temporary', '=', True)]}"/>
  50. <button type="object" name="save_report" string="Save" icon="gtk-floppy" attrs="{'invisible': [('temporary', '=', False)]}"/>
  51. </div>
  52. <div class="oe_title">
  53. <div class="oe_edit_only">
  54. <label for="name"/>
  55. </div>
  56. <h1>
  57. <field name="name" placeholder="Name"/>
  58. </h1>
  59. <field name="description"/>
  60. </div>
  61. <group>
  62. <group>
  63. <field name="report_id"/>
  64. <field name="target_move" widget="radio"/>
  65. <field name="landscape_pdf"/>
  66. <field name="comparison_mode"/>
  67. <field name="company_id" groups="base.group_multi_company"/>
  68. </group>
  69. <group>
  70. <group name="simple_mode"
  71. attrs="{'invisible': [('comparison_mode', '=', True)]}" colspan="4">
  72. <field name="date_range_id"/>
  73. <field name="date_from" attrs="{'required': [('comparison_mode', '=', False)]}"/>
  74. <field name="date_to" attrs="{'required': [('comparison_mode', '=', False)]}"/>
  75. </group>
  76. </group>
  77. </group>
  78. <group name="comparison_mode" string="Comparison"
  79. attrs="{'invisible': [('comparison_mode', '=', False)]}" colspan="4">
  80. <field name="period_ids" colspan="4" nolabel="1" attrs="{'required': [('comparison_mode', '=', True)]}">
  81. <tree string="KPI's" colors="red:valid==False">
  82. <field name="sequence" widget="handle"/>
  83. <field name="name"/>
  84. <field name="date_from"/>
  85. <field name="date_to"/>
  86. <field name="valid" invisible="1"/>
  87. <field name="report_instance_id" invisible="1"/>
  88. <field name="id" invisible="1"/>
  89. <field name="subkpi_ids"
  90. domain="[('report_id', '=', parent.report_id)]"
  91. widget="many2many_tags"/>
  92. <field name="comparison_column_ids" domain="[('report_instance_id', '=', report_instance_id), ('id', '!=', id)]" widget="many2many_tags"/>
  93. </tree>
  94. </field>
  95. <field name="date"/>
  96. </group>
  97. </sheet>
  98. </form>
  99. </field>
  100. </record>
  101. <record model="ir.actions.act_window" id="mis_report_instance_view_action">
  102. <field name="name">MIS Reports</field>
  103. <field name="view_id" ref="mis_report_instance_view_tree"/>
  104. <field name="res_model">mis.report.instance</field>
  105. <field name="view_type">form</field>
  106. <field name="view_mode">tree,form</field>
  107. <field name="domain">[('temporary', '=', False)]</field>
  108. </record>
  109. <menuitem id="mis_report_instance_view_menu" parent="account.menu_finance_reports" name="MIS Reports" action="mis_report_instance_view_action" sequence="101"/>
  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="account.menu_finance_reports"
  146. name="Last Reports Generated"
  147. action="last_mis_report_instance_view_action"
  148. sequence="102"/>
  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>