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.

420 lines
23 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_style_view_form" model="ir.ui.view">
  100. <field name="name">mis.report.style.view.form</field>
  101. <field name="model">mis.report.kpi.style</field>
  102. <field name="arch" type="xml">
  103. <form>
  104. <group>
  105. <field name="name" />
  106. <field name="color" widget="web.colorpicker" />
  107. <field name="background_color" />
  108. <field name="font_style" />
  109. <field name="font_weight" />
  110. <field name="font_size" />
  111. <field name="indent_level" />
  112. </group>
  113. </form>
  114. </field>
  115. </record>
  116. <record id="mis_report_view_kpi_form" model="ir.ui.view">
  117. <field name="name">mis.report.view.kpi.form</field>
  118. <field name="model">mis.report.kpi</field>
  119. <field name="arch" type="xml">
  120. <form string="MIS Report KPI" version="7.0">
  121. <group col="4">
  122. <field name="description"/>
  123. <field name="name"/>
  124. <field name="type"/>
  125. <field name="dp"
  126. attrs="{'invisible': [('type', '=', 'str')]}"/>
  127. <field name="divider"
  128. attrs="{'invisible': [('type', '=', 'str')]}"/>
  129. <field name="compare_method"
  130. attrs="{'invisible': [('type', '=', 'str')]}"/>
  131. <field name="prefix"/>
  132. <field name="suffix"/>
  133. <field name="style" colspan="4"/>
  134. <field name="style_expression" colspan="4"/>
  135. <!--<field name="sequence" />-->
  136. </group>
  137. <group string="Expression">
  138. <field name="multi"/>
  139. <field name="expression_ids" colspan="4" nolabel="1"
  140. delete="0" create="0"
  141. attrs="{'invisible': [('multi', '=', False)]}">
  142. <tree editable="bottom">
  143. <field name="subkpi_id"/>
  144. <field name="name"/>
  145. </tree>
  146. </field>
  147. <field name="expression" colspan="4" nolabel="1"
  148. attrs="{'invisible': [('multi', '=', True)],
  149. 'readonly': [('multi', '=', True)]}"/>
  150. </group>
  151. <group string="Auto expand">
  152. <field name="auto_expand_accounts"/>
  153. </group>
  154. <group col="2" string="Legend (for kpi expressions)">
  155. <group>
  156. <label colspan="2" string="Expressions are of the form &lt;field&gt;&lt;mode&gt;[accounts][domain]"/>
  157. <label colspan="2" string="Possible values for 'field' can be:"/>
  158. <group>
  159. <label colspan="2" string="* bal for balance (debit - credit)"/>
  160. <label colspan="2" string="* crd for credit"/>
  161. <label colspan="2" string="* deb for debit"/>
  162. </group>
  163. <label colspan="2" string="Possible values for 'mode' are:"/>
  164. <group>
  165. <label colspan="2" string="* nothing or p: variation over the period"/>
  166. <label colspan="2" string="* i: at the beginning of the period"/>
  167. <label colspan="2" string="* e: at the end of the period"/>
  168. </group>
  169. <label colspan="2" string="'accounts' is a comma-separated list of account codes, possibly containing %% wildcards"/>
  170. <label colspan="2" string="'domain' is an optional filter on move lines (eg to filter on analytic accounts or journal)"/>
  171. </group>
  172. <group>
  173. <label colspan="2" string="Examples"/>
  174. <group>
  175. <label colspan="2" string="* bal[70]: variation of the balance of account 70 over the period (it is the same as balp[70]);"/>
  176. <label colspan="2" string="* bali[70,60]: initial balance of accounts 70 and 60;"/>
  177. <label colspan="2" string="* bale[1%%]: balance of accounts starting with 1 at end of period."/>
  178. </group>
  179. </group>
  180. </group>
  181. </form>
  182. </field>
  183. </record>
  184. <record model="ir.actions.act_window" id="mis_report_view_action">
  185. <field name="name">MIS Report Templates</field>
  186. <field name="view_id" ref="mis_report_view_tree"/>
  187. <field name="res_model">mis.report</field>
  188. <field name="view_type">form</field>
  189. <field name="view_mode">tree,form</field>
  190. </record>
  191. <menuitem id="mis_report_view_menu" parent="account.account_management_menu" name="MIS Report Templates" action="mis_report_view_action" sequence="21"/>
  192. <record id="xls_export" model="ir.actions.report.xml">
  193. <field name="name">MIS report instance XLS report</field>
  194. <field name="model">mis.report.instance</field>
  195. <field name="type">ir.actions.report.xml</field>
  196. <field name="report_name">mis.report.instance.xlsx</field>
  197. <field name="report_type">xlsx</field>
  198. <field name="auto" eval="False"/>
  199. </record>
  200. <record id="qweb_pdf_export" model="ir.actions.report.xml">
  201. <field name="name">MIS report instance QWEB PDF report</field>
  202. <field name="model">mis.report.instance</field>
  203. <field name="type">ir.actions.report.xml</field>
  204. <field name="report_name">mis_builder.report_mis_report_instance</field>
  205. <field name="report_type">qweb-pdf</field>
  206. <field name="auto" eval="False"/>
  207. </record>
  208. <record model="ir.ui.view" id="mis_report_instance_result_view_form">
  209. <field name="name">mis.report.instance.result.view.form</field>
  210. <field name="model">mis.report.instance</field>
  211. <field name="priority" eval="15 "/>
  212. <field name="arch" type="xml">
  213. <form string="MIS Report Result" version="7.0">
  214. <widget type="mis_report"></widget>
  215. </form>
  216. </field>
  217. </record>
  218. <record model="ir.ui.view" id="mis_report_instance_view_tree">
  219. <field name="name">mis.report.instance.view.tree</field>
  220. <field name="model">mis.report.instance</field>
  221. <field name="arch" type="xml">
  222. <tree string="MIS Report Instances">
  223. <field name="name"/>
  224. <field name="description"/>
  225. <field name="report_id"/>
  226. <field name="target_move"/>
  227. <field name="pivot_date"/>
  228. <field name="company_id"/>
  229. <button name="display_settings" type="object" icon="gtk-execute" />
  230. </tree>
  231. </field>
  232. </record>
  233. <record model="ir.ui.view" id="mis_report_instance_view_form">
  234. <field name="name">mis.report.instance.view.form</field>
  235. <field name="model">mis.report.instance</field>
  236. <field name="priority" eval="16"/>
  237. <field name="arch" type="xml">
  238. <form string="MIS Report Instance" version="7.0">
  239. <sheet>
  240. <field name="temporary" invisible="1"/>
  241. <div class="oe_right oe_button_box" name="buttons">
  242. <button type="object" name="preview" string="Preview" icon="gtk-print-preview" />
  243. <button type="object" name="print_pdf" string="Print" icon="gtk-print" />
  244. <button type="object" name="export_xls" string="Export" icon="gtk-go-down" />
  245. <button type="action" name="%(mis_report_instance_add_to_dashboard_action)d" string="Add to dashboard" icon="gtk-add" attrs="{'invisible': [('temporary', '=', True)]}"/>
  246. <button type="object" name="save_report" string="Save" icon="gtk-floppy" attrs="{'invisible': [('temporary', '=', False)]}"/>
  247. </div>
  248. <div class="oe_title">
  249. <div class="oe_edit_only">
  250. <label for="name"/>
  251. </div>
  252. <h1>
  253. <field name="name" placeholder="Name"/>
  254. </h1>
  255. <field name="description"/>
  256. </div>
  257. <group>
  258. <group>
  259. <field name="report_id"/>
  260. <field name="target_move" widget="radio"/>
  261. <field name="landscape_pdf"/>
  262. <field name="comparison_mode"/>
  263. <field name="company_id" groups="base.group_multi_company"/>
  264. </group>
  265. <group>
  266. <group name="simple_mode"
  267. attrs="{'invisible': [('comparison_mode', '=', True)]}" colspan="4">
  268. <field name="date_range_id"/>
  269. <field name="date_from" attrs="{'required': [('comparison_mode', '=', False)]}"/>
  270. <field name="date_to" attrs="{'required': [('comparison_mode', '=', False)]}"/>
  271. </group>
  272. </group>
  273. </group>
  274. <group name="comparison_mode" string="Comparison"
  275. attrs="{'invisible': [('comparison_mode', '=', False)]}" colspan="4">
  276. <field name="period_ids" colspan="4" nolabel="1" attrs="{'required': [('comparison_mode', '=', True)]}">
  277. <tree string="KPI's" colors="red:valid==False">
  278. <field name="sequence" widget="handle"/>
  279. <field name="name"/>
  280. <field name="type"/>
  281. <field name="date_range_type_id"
  282. attrs="{'invisible': [('type', '!=', 'date_range')], 'required': [('type', '=', 'date_range')]}"/>
  283. <field name="date_from"/>
  284. <field name="date_to"/>
  285. <field name="valid" invisible="1"/>
  286. <field name="report_instance_id" invisible="1"/>
  287. <field name="id" invisible="1"/>
  288. <field name="subkpi_ids"
  289. domain="[('report_id', '=', parent.report_id)]"
  290. widget="many2many_tags"/>
  291. <field name="comparison_column_ids" domain="[('report_instance_id', '=', report_instance_id), ('id', '!=', id)]" widget="many2many_tags"/>
  292. </tree>
  293. </field>
  294. <field name="date"/>
  295. </group>
  296. </sheet>
  297. </form>
  298. </field>
  299. </record>
  300. <record model="ir.actions.act_window" id="mis_report_instance_view_action">
  301. <field name="name">MIS Reports</field>
  302. <field name="view_id" ref="mis_report_instance_view_tree"/>
  303. <field name="res_model">mis.report.instance</field>
  304. <field name="view_type">form</field>
  305. <field name="view_mode">tree,form</field>
  306. <field name="domain"></field>
  307. </record>
  308. <menuitem id="mis_report_instance_view_menu" parent="account.menu_finance_reports" name="MIS Reports" action="mis_report_instance_view_action" sequence="101"/>
  309. <record id="wizard_mis_report_instance_view_form" model="ir.ui.view">
  310. <field name="model">mis.report.instance</field>
  311. <field name="inherit_id" ref="mis_builder.mis_report_instance_view_form"/>
  312. <field name="mode">primary</field>
  313. <field name="arch" type="xml">
  314. <field name="name" position="attributes">
  315. <attribute name="readonly">1</attribute>
  316. </field>
  317. <label for="name" position="replace"/>
  318. <field name="report_id" position="attributes">
  319. <attribute name="invisible">1</attribute>
  320. </field>
  321. <div name="buttons" position="attributes">
  322. <attribute name="invisible">1</attribute>
  323. </div>
  324. <sheet position="after">
  325. <footer>
  326. <button type="object" name="save_report" string="Save" icon="gtk-floppy"/>
  327. <button type="object" name="preview" string="Preview" icon="gtk-print-preview" />
  328. <button type="object" name="print_pdf" string="Print" icon="gtk-print" />
  329. <button type="object" name="export_xls" string="Export" icon="gtk-go-down" />
  330. or <button string="Cancel" class="oe_link" special="cancel" />
  331. </footer>
  332. </sheet>
  333. </field>
  334. </record>
  335. <record model="ir.actions.act_window" id="last_mis_report_instance_view_action">
  336. <field name="name">Last Reports Generated</field>
  337. <field name="view_id" ref="mis_report_instance_view_tree"/>
  338. <field name="res_model">mis.report.instance</field>
  339. <field name="view_type">form</field>
  340. <field name="view_mode">tree,form</field>
  341. <field name="domain">[('temporary', '=', True)]</field>
  342. </record>
  343. <menuitem id="last_wizard_mis_report_instance_view_menu"
  344. parent="account.menu_finance_reports"
  345. name="Last Reports Generated"
  346. action="last_mis_report_instance_view_action"
  347. sequence="102"/>
  348. <record model="ir.ui.view" id="mis_report_instance_period_view_form">
  349. <field name="model">mis.report.instance.period</field>
  350. <field name="priority" eval="16"/>
  351. <field name="arch" type="xml">
  352. <form string="KPI's">
  353. <sheet>
  354. <div class="oe_title">
  355. <div class="oe_edit_only">
  356. <label for="name"/>
  357. </div>
  358. <h1>
  359. <field name="name" placeholder="Name"/>
  360. </h1>
  361. </div>
  362. <group>
  363. <field name="mode" widget="radio"/>
  364. <group name="relative" attrs="{'invisible': [('mode', '!=', 'relative')]}" colspan="4">
  365. <group>
  366. <field name="type"/>
  367. <field name="date_range_type_id"
  368. attrs="{'invisible': [('type', '!=', 'date_range')], 'required': [('type', '=', 'date_range')]}"/>
  369. <field name="offset"/>
  370. <field name="duration"/>
  371. </group>
  372. <group>
  373. <field name="date_from"/>
  374. <field name="date_to"/>
  375. </group>
  376. </group>
  377. <group name="fix" attrs="{'invisible': [('mode', '!=', 'fix')]}" colspan="4">
  378. <field name="date_range_id"/>
  379. <field name="manual_date_from"
  380. attrs="{'required': [('mode', '=', 'fix')]}"/>
  381. <field name="manual_date_to"
  382. attrs="{'required': [('mode', '=', 'fix')]}"/>
  383. </group>
  384. <field name="normalize_factor"/>
  385. <field name="report_instance_id" invisible="1"/>
  386. <field name="id" invisible="1"/>
  387. <field name="subkpi_ids"
  388. domain="[('report_id', '=', parent.report_id)]"
  389. widget="many2many_tags"/>
  390. <field name="comparison_column_ids"
  391. domain="[('report_instance_id', '=', report_instance_id), ('id', '!=', id)]"
  392. widget="many2many_tags"/>
  393. </group>
  394. </sheet>
  395. </form>
  396. </field>
  397. </record>
  398. </data>
  399. </openerp>