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.

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