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.

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