[IMP] account_statement_import_online: Add button in journal to see provider configuration

TT49855
This commit is contained in:
Carolina Fernandez
2024-07-30 05:00:59 -07:00
parent ddffa46c63
commit 5f4c76ae60
4 changed files with 29 additions and 19 deletions

View File

@@ -95,6 +95,7 @@ msgstr ""
#. module: account_statement_import_online
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.online_bank_statement_provider_form
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.view_account_journal_form
msgid "Configuration"
msgstr ""

View File

@@ -98,6 +98,7 @@ msgstr "Compañía relacionada a este diario"
#. module: account_statement_import_online
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.online_bank_statement_provider_form
#: model_terms:ir.ui.view,arch_db:account_statement_import_online.view_account_journal_form
msgid "Configuration"
msgstr "Configuración"

View File

@@ -95,3 +95,13 @@ class AccountJournal(models.Model):
self.ensure_one()
provider = self.online_bank_statement_provider_id
return provider.action_online_bank_statements_pull_wizard()
def action_open_online_bank_statement_provider(self):
return {
"type": "ir.actions.act_window",
"name": "Statement Provider",
"view_mode": "form",
"res_model": "online.bank.statement.provider",
"res_id": self.online_bank_statement_provider_id.id,
"target": "current",
}

View File

@@ -21,6 +21,7 @@
groups="account.group_account_user"
invisible="bank_statements_source != 'online'"
>
<label
for="online_bank_statement_provider"
string="Provider"
@@ -28,25 +29,22 @@
class="oe_edit_only"
groups="account.group_account_user"
/>
<field
name="online_bank_statement_provider"
nolabel="1"
required="bank_statements_source == 'online'"
class="oe_edit_only"
groups="account.group_account_user"
/>
<label
for="online_bank_statement_provider_id"
string="Provider"
invisible="not online_bank_statement_provider_id"
class="oe_read_only"
/>
<field
name="online_bank_statement_provider_id"
nolabel="1"
invisible="not online_bank_statement_provider_id"
class="oe_read_only"
/>
<div>
<field
name="online_bank_statement_provider"
nolabel="1"
required="bank_statements_source == 'online'"
class="oe_inline"
groups="account.group_account_user"
/>
<field name="online_bank_statement_provider_id" invisible="1" />
<button
name="action_open_online_bank_statement_provider"
type="object"
string="Configuration"
invisible="not online_bank_statement_provider_id"
/>
</div>
</group>
</xpath>
<xpath expr="//div[@name='button_box']" position="inside">