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.

127 lines
6.0 KiB

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