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.

183 lines
8.2 KiB

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <odoo>
  3. <!-- GENERAL LEDGER -->
  4. <record id="general_ledger_wizard" model="ir.ui.view">
  5. <field name="name">General Ledger</field>
  6. <field name="model">general.ledger.report.wizard</field>
  7. <field name="arch" type="xml">
  8. <form>
  9. <group name="main_info">
  10. <field
  11. name="company_id"
  12. options="{'no_create': True}"
  13. groups="base.group_multi_company"
  14. />
  15. </group>
  16. <div
  17. attrs="{'invisible': [('not_only_one_unaffected_earnings_account', '=', True)]}"
  18. >
  19. <group name="filters">
  20. <group name="date_range">
  21. <field name="date_range_id" />
  22. <field name="date_from" />
  23. <field name="date_to" />
  24. <field name="fy_start_date" invisible="1" />
  25. </group>
  26. <group name="other_filters">
  27. <field name="target_move" widget="radio" />
  28. <field name="centralize" />
  29. <field name="show_partner_details" />
  30. <field name="hide_account_at_0" />
  31. <field name="foreign_currency" />
  32. <field name="show_analytic_tags" />
  33. <field name="show_cost_center" />
  34. </group>
  35. </group>
  36. <notebook>
  37. <page string="Filter accounts">
  38. <group name="account_filter" col="4">
  39. <label for="account_ids" colspan="4" />
  40. <field name="receivable_accounts_only" />
  41. <field name="payable_accounts_only" />
  42. <label for="account_code_from" string="From Code" />
  43. <div>
  44. <div class="o_row">
  45. <field
  46. name="account_code_from"
  47. class="oe_inline"
  48. options="{'no_create': True}"
  49. />
  50. <span class="oe_inline">To</span>
  51. <field
  52. name="account_code_to"
  53. class="oe_inline"
  54. options="{'no_create': True}"
  55. />
  56. </div>
  57. </div>
  58. <field
  59. name="account_ids"
  60. nolabel="1"
  61. widget="many2many_tags"
  62. options="{'no_create': True}"
  63. colspan="4"
  64. />
  65. </group>
  66. </page>
  67. <page string="Filter partners">
  68. <field
  69. name="partner_ids"
  70. nolabel="1"
  71. widget="many2many_tags"
  72. options="{'no_create': True}"
  73. />
  74. </page>
  75. <page
  76. string="Filter analytic accounts"
  77. groups="analytic.group_analytic_accounting"
  78. >
  79. <field
  80. name="cost_center_ids"
  81. nolabel="1"
  82. widget="many2many_tags"
  83. options="{'no_create': True}"
  84. />
  85. </page>
  86. <page string="Filter analytic tags">
  87. <field
  88. name="analytic_tag_ids"
  89. widget="many2many_tags"
  90. nolabel="1"
  91. options="{'no_create': True}"
  92. />
  93. </page>
  94. <page string="Additional Filtering">
  95. <style>
  96. .o_domain_show_selection_button {display: none}
  97. </style>
  98. <field
  99. name="domain"
  100. widget="domain"
  101. options="{'model': 'account.move.line', 'in_dialog': True}"
  102. context="{'skip_search_count': 1}"
  103. />
  104. </page>
  105. </notebook>
  106. </div>
  107. <div
  108. attrs="{'invisible': [('not_only_one_unaffected_earnings_account', '=', False)]}"
  109. >
  110. <field
  111. name="not_only_one_unaffected_earnings_account"
  112. invisible="1"
  113. />
  114. <group />
  115. <h4>
  116. General Ledger can be computed only if selected company have
  117. only one unaffected earnings account.
  118. </h4>
  119. <group />
  120. </div>
  121. <footer>
  122. <div
  123. attrs="{'invisible': [('not_only_one_unaffected_earnings_account', '=', True)]}"
  124. >
  125. <button
  126. name="button_export_html"
  127. string="View"
  128. type="object"
  129. default_focus="1"
  130. class="oe_highlight"
  131. />
  132. or
  133. <button
  134. name="button_export_pdf"
  135. string="Export PDF"
  136. type="object"
  137. />
  138. or
  139. <button
  140. name="button_export_xlsx"
  141. string="Export XLSX"
  142. type="object"
  143. />
  144. or
  145. <button string="Cancel" class="oe_link" special="cancel" />
  146. </div>
  147. <div
  148. attrs="{'invisible': [('not_only_one_unaffected_earnings_account', '=', False)]}"
  149. >
  150. <button string="Cancel" class="oe_link" special="cancel" />
  151. </div>
  152. </footer>
  153. </form>
  154. </field>
  155. </record>
  156. <record id="action_general_ledger_wizard" model="ir.actions.act_window">
  157. <field name="name">General Ledger</field>
  158. <field name="res_model">general.ledger.report.wizard</field>
  159. <field name="view_mode">form</field>
  160. <field name="view_id" ref="general_ledger_wizard" />
  161. <field name="target">new</field>
  162. </record>
  163. <!--Add to res.partner action-->
  164. <record
  165. id="act_action_general_ledger_wizard_partner_relation"
  166. model="ir.actions.act_window"
  167. >
  168. <field name="name">General Ledger</field>
  169. <field name="res_model">general.ledger.report.wizard</field>
  170. <field name="binding_model_id" ref="base.model_res_partner" />
  171. <field name="view_mode">form</field>
  172. <field name="view_id" ref="general_ledger_wizard" />
  173. <field
  174. name="context"
  175. eval="{
  176. 'default_receivable_accounts_only':1,
  177. 'default_payable_accounts_only':1,
  178. }"
  179. />
  180. <field name="groups_id" eval="[(4, ref('account.group_account_manager'))]" />
  181. <field name="target">new</field>
  182. </record>
  183. </odoo>