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.

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