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.

204 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_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_instance_view_menu" parent="account.menu_finance_reports" name="MIS Reports" action="mis_report_instance_view_action" sequence="101"/>
  109. <record id="wizard_mis_report_instance_view_form" model="ir.ui.view">
  110. <field name="model">mis.report.instance</field>
  111. <field name="inherit_id" ref="mis_builder.mis_report_instance_view_form"/>
  112. <field name="mode">primary</field>
  113. <field name="arch" type="xml">
  114. <field name="name" position="attributes">
  115. <attribute name="readonly">1</attribute>
  116. </field>
  117. <label for="name" position="replace"/>
  118. <field name="report_id" position="attributes">
  119. <attribute name="invisible">1</attribute>
  120. </field>
  121. <div name="buttons" position="attributes">
  122. <attribute name="invisible">1</attribute>
  123. </div>
  124. <sheet position="after">
  125. <footer>
  126. <button type="object" name="save_report" string="Save" icon="gtk-floppy"/>
  127. <button type="object" name="preview" string="Preview" icon="gtk-print-preview" />
  128. <button type="object" name="print_pdf" string="Print" icon="gtk-print" />
  129. <button type="object" name="export_xls" string="Export" icon="gtk-go-down" />
  130. or <button string="Cancel" class="oe_link" special="cancel" />
  131. </footer>
  132. </sheet>
  133. </field>
  134. </record>
  135. <record model="ir.actions.act_window" id="last_mis_report_instance_view_action">
  136. <field name="name">Last Reports Generated</field>
  137. <field name="view_id" ref="mis_report_instance_view_tree"/>
  138. <field name="res_model">mis.report.instance</field>
  139. <field name="view_type">form</field>
  140. <field name="view_mode">tree,form</field>
  141. <field name="domain">[('temporary', '=', True)]</field>
  142. </record>
  143. <menuitem id="last_wizard_mis_report_instance_view_menu"
  144. parent="account.menu_finance_reports"
  145. name="Last Reports Generated"
  146. action="last_mis_report_instance_view_action"
  147. sequence="102"/>
  148. <record model="ir.ui.view" id="mis_report_instance_period_view_form">
  149. <field name="model">mis.report.instance.period</field>
  150. <field name="priority" eval="16"/>
  151. <field name="arch" type="xml">
  152. <form string="KPI's">
  153. <sheet>
  154. <group>
  155. <field name="mode" widget="radio"/>
  156. <field name="valid" invisible="1"/>
  157. <group name="relative" attrs="{'invisible': [('mode', '!=', 'relative')]}" colspan="4">
  158. <group>
  159. <field name="type" attrs="{'required': [('mode', '=', 'relative')]}"/>
  160. <field name="date_range_type_id"
  161. attrs="{'invisible': [('type', '!=', 'date_range')], 'required': [('type', '=', 'date_range')]}"/>
  162. <field name="offset"/>
  163. <field name="duration"/>
  164. </group>
  165. <group>
  166. <field name="date_from"/>
  167. <field name="date_to"/>
  168. </group>
  169. </group>
  170. <group name="fix" attrs="{'invisible': [('mode', '!=', 'fix')]}" colspan="4">
  171. <field name="date_range_id"/>
  172. <field name="manual_date_from"
  173. attrs="{'required': [('mode', '=', 'fix')]}"/>
  174. <field name="manual_date_to"
  175. attrs="{'required': [('mode', '=', 'fix')]}"/>
  176. </group>
  177. <field name="name" placeholder="Name"/>
  178. <field name="normalize_factor"/>
  179. <field name="report_instance_id" invisible="1"/>
  180. <field name="id" invisible="1"/>
  181. <field name="subkpi_ids"
  182. domain="[('report_id', '=', parent.report_id)]"
  183. widget="many2many_tags"/>
  184. <field name="comparison_column_ids"
  185. domain="[('report_instance_id', '=', report_instance_id), ('id', '!=', id)]"
  186. widget="many2many_tags"/>
  187. </group>
  188. </sheet>
  189. </form>
  190. </field>
  191. </record>
  192. </data>
  193. </openerp>