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.

417 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.account_management_menu" 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="15 "/>
  218. <field name="arch" type="xml">
  219. <form string="MIS Report Result" version="7.0">
  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. <field name="name"/>
  230. <field name="description"/>
  231. <field name="report_id"/>
  232. <field name="target_move"/>
  233. <field name="pivot_date"/>
  234. <field name="company_id"/>
  235. <button name="display_settings" type="object" icon="gtk-execute" />
  236. </tree>
  237. </field>
  238. </record>
  239. <record model="ir.ui.view" id="mis_report_instance_view_form">
  240. <field name="name">mis.report.instance.view.form</field>
  241. <field name="model">mis.report.instance</field>
  242. <field name="priority" eval="16"/>
  243. <field name="arch" type="xml">
  244. <form string="MIS Report Instance" version="7.0">
  245. <sheet>
  246. <field name="temporary" invisible="1"/>
  247. <div class="oe_right oe_button_box" name="buttons">
  248. <button type="object" name="preview" string="Preview" icon="gtk-print-preview" />
  249. <button type="object" name="print_pdf" string="Print" icon="gtk-print" />
  250. <button type="object" name="export_xls" string="Export" icon="gtk-go-down" />
  251. <button type="action" name="%(mis_report_instance_add_to_dashboard_action)d" string="Add to dashboard" icon="gtk-add" attrs="{'invisible': [('temporary', '=', True)]}"/>
  252. <button type="object" name="save_report" string="Save" icon="gtk-floppy" attrs="{'invisible': [('temporary', '=', False)]}"/>
  253. </div>
  254. <div class="oe_title">
  255. <div class="oe_edit_only">
  256. <label for="name"/>
  257. </div>
  258. <h1>
  259. <field name="name" placeholder="Name"/>
  260. </h1>
  261. <field name="description"/>
  262. </div>
  263. <group>
  264. <group>
  265. <field name="report_id"/>
  266. <field name="target_move" widget="radio"/>
  267. <field name="landscape_pdf"/>
  268. <field name="comparison_mode"/>
  269. <field name="company_id" groups="base.group_multi_company"/>
  270. </group>
  271. <group>
  272. <group name="simple_mode"
  273. attrs="{'invisible': [('comparison_mode', '=', True)]}" colspan="4">
  274. <field name="date_range_id"/>
  275. <field name="date_from" attrs="{'required': [('comparison_mode', '=', False)]}"/>
  276. <field name="date_to" attrs="{'required': [('comparison_mode', '=', False)]}"/>
  277. </group>
  278. </group>
  279. </group>
  280. <group name="comparison_mode" string="Comparison"
  281. attrs="{'invisible': [('comparison_mode', '=', False)]}" colspan="4">
  282. <field name="period_ids" colspan="4" nolabel="1" attrs="{'required': [('comparison_mode', '=', True)]}">
  283. <tree string="KPI's" colors="red:valid==False">
  284. <field name="sequence" widget="handle"/>
  285. <field name="name"/>
  286. <field name="date_from"/>
  287. <field name="date_to"/>
  288. <field name="valid" invisible="1"/>
  289. <field name="report_instance_id" invisible="1"/>
  290. <field name="id" invisible="1"/>
  291. <field name="subkpi_ids"
  292. domain="[('report_id', '=', parent.report_id)]"
  293. widget="many2many_tags"/>
  294. <field name="comparison_column_ids" domain="[('report_instance_id', '=', report_instance_id), ('id', '!=', id)]" widget="many2many_tags"/>
  295. </tree>
  296. </field>
  297. <field name="date"/>
  298. </group>
  299. </sheet>
  300. </form>
  301. </field>
  302. </record>
  303. <record model="ir.actions.act_window" id="mis_report_instance_view_action">
  304. <field name="name">MIS Reports</field>
  305. <field name="view_id" ref="mis_report_instance_view_tree"/>
  306. <field name="res_model">mis.report.instance</field>
  307. <field name="view_type">form</field>
  308. <field name="view_mode">tree,form</field>
  309. <field name="domain">[('temporary', '=', False)]</field>
  310. </record>
  311. <menuitem id="mis_report_instance_view_menu" parent="account.menu_finance_reports" name="MIS Reports" action="mis_report_instance_view_action" sequence="101"/>
  312. <record id="wizard_mis_report_instance_view_form" model="ir.ui.view">
  313. <field name="model">mis.report.instance</field>
  314. <field name="inherit_id" ref="mis_builder.mis_report_instance_view_form"/>
  315. <field name="mode">primary</field>
  316. <field name="arch" type="xml">
  317. <field name="name" position="attributes">
  318. <attribute name="readonly">1</attribute>
  319. </field>
  320. <label for="name" position="replace"/>
  321. <field name="report_id" position="attributes">
  322. <attribute name="invisible">1</attribute>
  323. </field>
  324. <div name="buttons" position="attributes">
  325. <attribute name="invisible">1</attribute>
  326. </div>
  327. <sheet position="after">
  328. <footer>
  329. <button type="object" name="save_report" string="Save" icon="gtk-floppy"/>
  330. <button type="object" name="preview" string="Preview" icon="gtk-print-preview" />
  331. <button type="object" name="print_pdf" string="Print" icon="gtk-print" />
  332. <button type="object" name="export_xls" string="Export" icon="gtk-go-down" />
  333. or <button string="Cancel" class="oe_link" special="cancel" />
  334. </footer>
  335. </sheet>
  336. </field>
  337. </record>
  338. <record model="ir.actions.act_window" id="last_mis_report_instance_view_action">
  339. <field name="name">Last Reports Generated</field>
  340. <field name="view_id" ref="mis_report_instance_view_tree"/>
  341. <field name="res_model">mis.report.instance</field>
  342. <field name="view_type">form</field>
  343. <field name="view_mode">tree,form</field>
  344. <field name="domain">[('temporary', '=', True)]</field>
  345. </record>
  346. <menuitem id="last_wizard_mis_report_instance_view_menu"
  347. parent="account.menu_finance_reports"
  348. name="Last Reports Generated"
  349. action="last_mis_report_instance_view_action"
  350. sequence="102"/>
  351. <record model="ir.ui.view" id="mis_report_instance_period_view_form">
  352. <field name="model">mis.report.instance.period</field>
  353. <field name="priority" eval="16"/>
  354. <field name="arch" type="xml">
  355. <form string="KPI's">
  356. <sheet>
  357. <group>
  358. <field name="mode" widget="radio"/>
  359. <field name="valid" invisible="1"/>
  360. <group name="relative" attrs="{'invisible': [('mode', '!=', 'relative')]}" colspan="4">
  361. <group>
  362. <field name="type" attrs="{'required': [('mode', '=', 'relative')]}"/>
  363. <field name="date_range_type_id"
  364. attrs="{'invisible': [('type', '!=', 'date_range')], 'required': [('type', '=', 'date_range')]}"/>
  365. <field name="offset"/>
  366. <field name="duration"/>
  367. </group>
  368. <group>
  369. <field name="date_from"/>
  370. <field name="date_to"/>
  371. </group>
  372. </group>
  373. <group name="fix" attrs="{'invisible': [('mode', '!=', 'fix')]}" colspan="4">
  374. <field name="date_range_id"/>
  375. <field name="manual_date_from"
  376. attrs="{'required': [('mode', '=', 'fix')]}"/>
  377. <field name="manual_date_to"
  378. attrs="{'required': [('mode', '=', 'fix')]}"/>
  379. </group>
  380. <field name="name" placeholder="Name"/>
  381. <field name="normalize_factor"/>
  382. <field name="report_instance_id" invisible="1"/>
  383. <field name="id" invisible="1"/>
  384. <field name="subkpi_ids"
  385. domain="[('report_id', '=', parent.report_id)]"
  386. widget="many2many_tags"/>
  387. <field name="comparison_column_ids"
  388. domain="[('report_instance_id', '=', report_instance_id), ('id', '!=', id)]"
  389. widget="many2many_tags"/>
  390. </group>
  391. </sheet>
  392. </form>
  393. </field>
  394. </record>
  395. </data>
  396. </openerp>