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