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.

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