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.

209 lines
11 KiB

10 years ago
10 years ago
  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. <field name="query_ids">
  30. <tree string="Queries" editable="bottom">
  31. <field name="name"/>
  32. <field name="model_id"/>
  33. <field name="field_ids" domain="[('model_id', '=', model_id)]" widget="many2many_tags"
  34. on_change="onchange_field_ids(field_ids, context)"/>
  35. <field name="field_names"/>
  36. <field name="groupby"/>
  37. <field name="groupby_field_ids" domain="[('model_id', '=', model_id)]" widget="many2many_tags"/>
  38. <field name="date_field" domain="[('model_id', '=', model_id), ('ttype', 'in', ('date', 'datetime'))]"/>
  39. <field name="domain"/>
  40. </tree>
  41. </field>
  42. <field name="kpi_ids">
  43. <tree string="KPI's" editable="bottom">
  44. <field name="sequence" widget="handle"/>
  45. <field name="description" on_change="onchange_description(description, name, context)"/>
  46. <field name="name" on_change="onchange_name(name, context)"/>
  47. <field name="expression"/>
  48. <field name="type" on_change="onchange_type(type, context)"/>
  49. <field name="dp" attrs="{'invisible': [('type', '=', 'str')]}"/>
  50. <field name="divider" attrs="{'invisible': [('type', '=', 'str')]}"/>
  51. <field name="suffix"/>
  52. <field name="compare_method" attrs="{'invisible': [('type', '=', 'str')]}"/>
  53. <field name="default_css_style"/>
  54. <field name="css_style"/>
  55. </tree>
  56. </field>
  57. </group>
  58. <group col="2" string="Legend (for expression)">
  59. <group>
  60. <label colspan="2" string="Expressions are of the form &lt;field&gt;&lt;mode&gt;[accounts][optional move line domain]"/>
  61. <label colspan="2" string="* Value for 'field' are :"/>
  62. <group>
  63. <label colspan="2" string="bal for balance of account"/>
  64. <label colspan="2" string="crd for credit of account"/>
  65. <label colspan="2" string="deb for debit of account"/>
  66. </group>
  67. <label colspan="2" string="* Value for 'mode' are :"/>
  68. <group>
  69. <label colspan="2" string="nothing or p for moves over period"/>
  70. <label colspan="2" string="i for for initial balance"/>
  71. <label colspan="2" string="e for ending balance"/>
  72. </group>
  73. <label colspan="2" string="* 'accounts' is a list of accounts, possibly containing %% wildcards"/>
  74. <label colspan="2" string="* 'optional move line domain' is an optional filters on eg analytic accounts or journal"/>
  75. </group>
  76. <group>
  77. <label colspan="2" string="Examples"/>
  78. <group>
  79. <label colspan="2" string="* bal[70]: balance of moves on account 70 over the period (it is the same as balp[70]);"/>
  80. <label colspan="2" string="* bali[70,60]: initial balance of accounts 70 and 60;"/>
  81. <label colspan="2" string="* bale[1%%]: balance of accounts starting with 1 at end of period."/>
  82. </group>
  83. </group>
  84. </group>
  85. </sheet>
  86. </form>
  87. </field>
  88. </record>
  89. <record model="ir.actions.act_window" id="mis_report_view_action">
  90. <field name="name">Mis report</field>
  91. <field name="view_id" ref="mis_report_view_tree"/>
  92. <field name="res_model">mis.report</field>
  93. <field name="view_type">form</field>
  94. <field name="view_mode">tree,form</field>
  95. </record>
  96. <menuitem id="mis_report_view_menu" parent="account.menu_account_reports" name="MIS Templates" action="mis_report_view_action" sequence="21"/>
  97. <record id="xls_export" model="ir.actions.report.xml">
  98. <field name="name">Export report instance result</field>
  99. <field name="model">mis.report.instance</field>
  100. <field name="type">ir.actions.report.xml</field>
  101. <field name="report_name">mis.report.instance.xls</field>
  102. <field name="report_type">xls</field>
  103. <field name="auto" eval="False"/>
  104. </record>
  105. <record model="ir.ui.view" id="mis_report_instance_result_view_form">
  106. <field name="name">mis.report.instance.result.view.form</field>
  107. <field name="model">mis.report.instance</field>
  108. <field name="priority" eval="17"/>
  109. <field name="arch" type="xml">
  110. <form string="MIS Report Result" version="7.0">
  111. <widget type="mis_report"></widget>
  112. <button icon="gtk-execute" name="%(xls_export)d" string="Export" type="action" colspan="2"/>
  113. </form>
  114. </field>
  115. </record>
  116. <record model="ir.actions.act_window" id="mis_report_instance_result_action">
  117. <field name="name">Preview</field>
  118. <field name="view_id" ref="mis_report_instance_result_view_form"/>
  119. <field name="res_model">mis.report.instance</field>
  120. <field name="view_type">form</field>
  121. <field name="view_mode">form</field>
  122. <field name="target">new</field>
  123. </record>
  124. <record model="ir.ui.view" id="mis_report_instance_view_tree">
  125. <field name="name">mis.report.instance.view.tree</field>
  126. <field name="model">mis.report.instance</field>
  127. <field name="arch" type="xml">
  128. <tree string="MIS Report Instances">
  129. <field name="name"/>
  130. <field name="description"/>
  131. <field name="report_id"/>
  132. <field name="target_move"/>
  133. <field name="pivot_date"/>
  134. <field name="company_id"/>
  135. </tree>
  136. </field>
  137. </record>
  138. <record model="ir.ui.view" id="mis_report_instance_view_form">
  139. <field name="name">mis.report.instance.view.form</field>
  140. <field name="model">mis.report.instance</field>
  141. <field name="priority" eval="16"/>
  142. <field name="arch" type="xml">
  143. <form string="MIS Report Instance" version="7.0">
  144. <sheet>
  145. <div class="oe_title">
  146. <div class="oe_edit_only">
  147. <label for="name"/>
  148. </div>
  149. <h1>
  150. <field name="name" placeholder="Name"/>
  151. </h1>
  152. </div>
  153. <div class="oe_right oe_button_box" name="buttons">
  154. <button type="action" name="%(mis_report_instance_result_action)d" string="Preview" />
  155. <button type="action" name="%(mis_report_instance_add_to_dashboard_action)d" string="Add to dashboard" />
  156. </div>
  157. <group col="2">
  158. <field name="description"/>
  159. <field name="report_id"/>
  160. <field name="company_id" groups="base.group_multi_company"/>
  161. <field name="root_account"/>
  162. <field name="target_move"/>
  163. <field name="date"/>
  164. <field name="period_ids">
  165. <tree string="KPI's" editable="bottom">
  166. <field name="sequence" widget="handle"/>
  167. <field name="name"/>
  168. <field name="type"/>
  169. <field name="offset"/>
  170. <field name="duration"/>
  171. <field name="normalize_factor"/>
  172. <field name="date_from"/>
  173. <field name="date_to"/>
  174. <field name="period_from"/>
  175. <field name="period_to"/>
  176. <field name="report_instance_id" invisible="1"/>
  177. <field name="id" invisible="1"/>
  178. <field name="comparison_column_ids" domain="[('report_instance_id', '=', report_instance_id), ('id', '!=', id)]" widget="many2many_tags"/>
  179. <field name="company_id" groups="base.group_multi_company"/>
  180. </tree>
  181. </field>
  182. </group>
  183. </sheet>
  184. </form>
  185. </field>
  186. </record>
  187. <record model="ir.actions.act_window" id="mis_report_instance_view_action">
  188. <field name="name">Mis report instance</field>
  189. <field name="view_id" ref="mis_report_instance_view_tree"/>
  190. <field name="res_model">mis.report.instance</field>
  191. <field name="view_type">form</field>
  192. <field name="view_mode">tree,form</field>
  193. </record>
  194. <menuitem id="mis_report_instance_view_menu" parent="account.menu_account_reports" name="MIS Reports" action="mis_report_instance_view_action" sequence="20"/>
  195. </data>
  196. </openerp>