Skip to content

Commit

Permalink
Merge PR #710 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Jul 30, 2024
2 parents 9964465 + 7de04f3 commit 44fa3b0
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""

Expand Down
1 change: 1 addition & 0 deletions account_statement_import_online/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
10 changes: 10 additions & 0 deletions account_statement_import_online/models/account_journal.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,13 @@ def action_online_bank_statements_pull_wizard(self):
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",
}
36 changes: 17 additions & 19 deletions account_statement_import_online/views/account_journal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,30 @@
groups="account.group_account_user"
attrs="{'invisible': [('bank_statements_source', '!=', 'online')]}"
>

<label
for="online_bank_statement_provider"
string="Provider"
attrs="{'required': [('bank_statements_source', '=', 'online')]}"
class="oe_edit_only"
groups="account.group_account_user"
/>
<field
name="online_bank_statement_provider"
nolabel="1"
attrs="{'required': [('bank_statements_source', '=', 'online')]}"
class="oe_edit_only"
groups="account.group_account_user"
/>
<label
for="online_bank_statement_provider_id"
string="Provider"
attrs="{'invisible': [('online_bank_statement_provider_id', '=', False)]}"
class="oe_read_only"
/>
<field
name="online_bank_statement_provider_id"
nolabel="1"
attrs="{'invisible': [('online_bank_statement_provider_id', '=', False)]}"
class="oe_read_only"
/>
<div>
<field
name="online_bank_statement_provider"
nolabel="1"
attrs="{'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"
attrs="{'invisible': [('online_bank_statement_provider_id', '=', False)]}"
/>
</div>
</group>
</xpath>
<xpath expr="//div[@name='button_box']" position="inside">
Expand Down

0 comments on commit 44fa3b0

Please sign in to comment.