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.

128 lines
6.0 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Copyright 2019-2020 Brainbean Apps (https://brainbeanapps.com)
  4. Copyright 2019-2020 Dataplug (https://dataplug.io)
  5. License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
  6. -->
  7. <odoo>
  8. <record model="ir.ui.view" id="view_account_journal_form">
  9. <field name="name">account.journal.form</field>
  10. <field name="model">account.journal</field>
  11. <field name="inherit_id" ref="account.view_account_journal_form"/>
  12. <field name="arch" type="xml">
  13. <page name="bank_account">
  14. <group
  15. name="online_bank_statements"
  16. string="Online Bank Statements (OCA)"
  17. groups="account.group_account_user"
  18. attrs="{'invisible': [('bank_statements_source', '!=', 'online')]}"
  19. >
  20. <label
  21. for="online_bank_statement_provider"
  22. string="Provider"
  23. attrs="{'required': [('bank_statements_source', '=', 'online')]}"
  24. class="oe_edit_only"
  25. groups="account.group_account_user"
  26. />
  27. <field
  28. name="online_bank_statement_provider"
  29. nolabel="1"
  30. attrs="{'required': [('bank_statements_source', '=', 'online')]}"
  31. class="oe_edit_only"
  32. groups="account.group_account_user"
  33. widget="dynamic_dropdown"
  34. values="values_online_bank_statement_provider"
  35. />
  36. <label
  37. for="online_bank_statement_provider_id"
  38. string="Provider"
  39. attrs="{'invisible': [('online_bank_statement_provider_id', '=', False)]}"
  40. class="oe_read_only"
  41. />
  42. <field
  43. name="online_bank_statement_provider_id"
  44. nolabel="1"
  45. attrs="{'invisible': [('online_bank_statement_provider_id', '=', False)]}"
  46. class="oe_read_only"
  47. />
  48. </group>
  49. </page>
  50. </field>
  51. </record>
  52. <record model="ir.ui.view" id="view_account_bank_journal_form">
  53. <field name="name">account.journal.form</field>
  54. <field name="model">account.journal</field>
  55. <field name="inherit_id" ref="account.view_account_bank_journal_form"/>
  56. <field name="arch" type="xml">
  57. <group name="bank_statement" position="after">
  58. <group
  59. name="online_bank_statements"
  60. string="Online Bank Statements (OCA)"
  61. groups="account.group_account_user"
  62. attrs="{'invisible': [('bank_statements_source', '!=', 'online')]}"
  63. >
  64. <label
  65. for="online_bank_statement_provider"
  66. string="Provider"
  67. attrs="{'required': [('bank_statements_source', '=', 'online')]}"
  68. class="oe_edit_only"
  69. groups="account.group_account_user"
  70. />
  71. <field
  72. name="online_bank_statement_provider"
  73. nolabel="1"
  74. attrs="{'required': [('bank_statements_source', '=', 'online')]}"
  75. class="oe_edit_only"
  76. groups="account.group_account_user"
  77. widget="dynamic_dropdown"
  78. values="values_online_bank_statement_provider"
  79. />
  80. <label
  81. for="online_bank_statement_provider_id"
  82. string="Provider"
  83. attrs="{'invisible': [('online_bank_statement_provider_id', '=', False)]}"
  84. class="oe_read_only"
  85. />
  86. <field
  87. name="online_bank_statement_provider_id"
  88. nolabel="1"
  89. attrs="{'invisible': [('online_bank_statement_provider_id', '=', False)]}"
  90. class="oe_read_only"
  91. />
  92. </group>
  93. </group>
  94. </field>
  95. </record>
  96. <record id="journal_dashboard_view_inherit" model="ir.ui.view">
  97. <field name="name">account.journal.dashboard.kanban</field>
  98. <field name="model">account.journal</field>
  99. <field name="inherit_id" ref="account_bank_statement_import.journal_dashboard_view_inherit"/>
  100. <field name="arch" type="xml">
  101. <div name="bank_statement_create_button" position="attributes">
  102. <attribute name="t-if">dashboard.bank_statements_source != 'online_sync' and dashboard.bank_statements_source != 'online'</attribute>
  103. </div>
  104. <xpath expr="//a[@name='create_bank_statement']" position="attributes">
  105. <attribute name="t-if">dashboard.bank_statements_source != 'online_sync' and dashboard.bank_statements_source != 'online'</attribute>
  106. </xpath>
  107. <xpath expr="//a[@name='import_statement']" position="attributes">
  108. <attribute name="t-if">dashboard.bank_statements_source != 'online_sync' and dashboard.bank_statements_source != 'online'</attribute>
  109. </xpath>
  110. </field>
  111. </record>
  112. <record id="action_online_bank_statements_pull_wizard" model="ir.actions.server">
  113. <field name="name">Online Bank Statements Pull Wizard</field>
  114. <field name="type">ir.actions.server</field>
  115. <field name="model_id" ref="account.model_account_journal"/>
  116. <field name="binding_model_id" ref="account.model_account_journal"/>
  117. <field name="state">code</field>
  118. <field name="code">
  119. if records:
  120. action = records.action_online_bank_statements_pull_wizard()
  121. </field>
  122. </record>
  123. </odoo>