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.

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