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.

218 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_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. <field name="field_names"/>
  35. <field name="aggregate"/>
  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"/>
  44. <field name="name"/>
  45. <field name="expression"/>
  46. <field name="type"/>
  47. <field name="dp" attrs="{'invisible': [('type', '=', 'str')]}"/>
  48. <field name="divider" attrs="{'invisible': [('type', '=', 'str')]}"/>
  49. <field name="prefix"/>
  50. <field name="suffix"/>
  51. <field name="compare_method" attrs="{'invisible': [('type', '=', 'str')]}"/>
  52. <field name="default_css_style"/>
  53. <field name="css_style"/>
  54. </tree>
  55. </field>
  56. </group>
  57. <group col="2" string="Legend (for expression)">
  58. <group>
  59. <label colspan="2" string="Expressions are of the form &lt;field&gt;&lt;mode&gt;[accounts][domain]"/>
  60. <label colspan="2" string="Possible values for 'field' can be:"/>
  61. <group>
  62. <label colspan="2" string="* bal for balance (debit - credit)"/>
  63. <label colspan="2" string="* crd for credit"/>
  64. <label colspan="2" string="* deb for debit"/>
  65. </group>
  66. <label colspan="2" string="Possible values for 'mode' are:"/>
  67. <group>
  68. <label colspan="2" string="* nothing or p: variation over the period"/>
  69. <label colspan="2" string="* i: at the beginning of the period"/>
  70. <label colspan="2" string="* e: at the end of the period"/>
  71. </group>
  72. <label colspan="2" string="'accounts' is a comma-separated list of account codes, possibly containing %% wildcards"/>
  73. <label colspan="2" string="'domain' is an optional filter on move lines (eg to filter on analytic accounts or journal)"/>
  74. </group>
  75. <group>
  76. <label colspan="2" string="Examples"/>
  77. <group>
  78. <label colspan="2" string="* bal[70]: variation of the balance of account 70 over the period (it is the same as balp[70]);"/>
  79. <label colspan="2" string="* bali[70,60]: initial balance of accounts 70 and 60;"/>
  80. <label colspan="2" string="* bale[1%%]: balance of accounts starting with 1 at end of period."/>
  81. </group>
  82. </group>
  83. </group>
  84. </sheet>
  85. </form>
  86. </field>
  87. </record>
  88. <record model="ir.actions.act_window" id="mis_report_view_action">
  89. <field name="name">MIS Report Templates</field>
  90. <field name="view_id" ref="mis_report_view_tree"/>
  91. <field name="res_model">mis.report</field>
  92. <field name="view_type">form</field>
  93. <field name="view_mode">tree,form</field>
  94. </record>
  95. <menuitem id="mis_report_view_menu" parent="account.menu_account_reports" name="MIS Report Templates" action="mis_report_view_action" sequence="21"/>
  96. <record id="xls_export" model="ir.actions.report.xml">
  97. <field name="name">MIS report instance XLS report</field>
  98. <field name="model">mis.report.instance</field>
  99. <field name="type">ir.actions.report.xml</field>
  100. <field name="report_name">mis.report.instance.xls</field>
  101. <field name="report_type">xls</field>
  102. <field name="auto" eval="False"/>
  103. </record>
  104. <record id="qweb_pdf_export" model="ir.actions.report.xml">
  105. <field name="name">MIS report instance QWEB PDF report</field>
  106. <field name="model">mis.report.instance</field>
  107. <field name="type">ir.actions.report.xml</field>
  108. <field name="report_name">mis_builder.report_mis_report_instance</field>
  109. <field name="report_type">qweb-pdf</field>
  110. <field name="auto" eval="False"/>
  111. </record>
  112. <record model="ir.ui.view" id="mis_report_instance_result_view_form">
  113. <field name="name">mis.report.instance.result.view.form</field>
  114. <field name="model">mis.report.instance</field>
  115. <field name="priority" eval="15 "/>
  116. <field name="arch" type="xml">
  117. <form string="MIS Report Result" version="7.0">
  118. <widget type="mis_report"></widget>
  119. </form>
  120. </field>
  121. </record>
  122. <record model="ir.ui.view" id="mis_report_instance_view_tree">
  123. <field name="name">mis.report.instance.view.tree</field>
  124. <field name="model">mis.report.instance</field>
  125. <field name="arch" type="xml">
  126. <tree string="MIS Report Instances">
  127. <field name="name"/>
  128. <field name="description"/>
  129. <field name="report_id"/>
  130. <field name="target_move"/>
  131. <field name="pivot_date"/>
  132. <field name="company_id"/>
  133. <button name="display_settings" type="object" icon="gtk-execute" />
  134. </tree>
  135. </field>
  136. </record>
  137. <record model="ir.ui.view" id="mis_report_instance_view_form">
  138. <field name="name">mis.report.instance.view.form</field>
  139. <field name="model">mis.report.instance</field>
  140. <field name="priority" eval="16"/>
  141. <field name="arch" type="xml">
  142. <form string="MIS Report Instance" version="7.0">
  143. <sheet>
  144. <div class="oe_title">
  145. <div class="oe_edit_only">
  146. <label for="name"/>
  147. </div>
  148. <h1>
  149. <field name="name" placeholder="Name"/>
  150. </h1>
  151. </div>
  152. <div class="oe_right oe_button_box" name="buttons">
  153. <button type="object" name="preview" string="Preview" icon="gtk-print-preview" />
  154. <button type="object" name="print_pdf" string="Print" icon="gtk-print" />
  155. <button type="object" name="export_xls" string="Export" icon="gtk-go-down" />
  156. <button type="action" name="%(mis_report_instance_add_to_dashboard_action)d" string="Add to dashboard" icon="gtk-add" />
  157. </div>
  158. <group col="4">
  159. <field name="report_id" colspan="4"/>
  160. <field name="description"/>
  161. <field name="landscape_pdf" />
  162. <field name="root_account"/>
  163. <field name="company_id" groups="base.group_multi_company"/>
  164. <field name="target_move"/>
  165. </group>
  166. <group col="4" string="Periods">
  167. <group colspan="2">
  168. <field name="date"/>
  169. </group>
  170. <newline/>
  171. <group>
  172. <field name="period_ids" colspan="4" nolabel="1">
  173. <tree string="KPI's" editable="bottom" colors="red:valid==False">
  174. <field name="sequence" widget="handle"/>
  175. <field name="name"/>
  176. <field name="type"/>
  177. <field name="offset"/>
  178. <field name="duration"/>
  179. <field name="normalize_factor"/>
  180. <field name="date_from"/>
  181. <field name="date_to"/>
  182. <field name="period_from"/>
  183. <field name="period_to"/>
  184. <field name="valid" invisible="1"/>
  185. <field name="report_instance_id" invisible="1"/>
  186. <field name="id" invisible="1"/>
  187. <field name="comparison_column_ids" domain="[('report_instance_id', '=', report_instance_id), ('id', '!=', id)]" widget="many2many_tags"/>
  188. </tree>
  189. </field>
  190. </group>
  191. </group>
  192. </sheet>
  193. </form>
  194. </field>
  195. </record>
  196. <record model="ir.actions.act_window" id="mis_report_instance_view_action">
  197. <field name="name">MIS Reports</field>
  198. <field name="view_id" ref="mis_report_instance_view_tree"/>
  199. <field name="res_model">mis.report.instance</field>
  200. <field name="view_type">form</field>
  201. <field name="view_mode">tree,form</field>
  202. </record>
  203. <menuitem id="mis_report_instance_view_menu" parent="account.menu_finance_reports" name="MIS Reports" action="mis_report_instance_view_action" sequence="101"/>
  204. </data>
  205. </openerp>