Skip to content

Commit

Permalink
[MIG] account_statement_import_online: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
carolinafernandez-tecnativa committed Jul 8, 2024
1 parent 0eddd6c commit 96c22d0
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 16 deletions.
4 changes: 4 additions & 0 deletions account_statement_import_online/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ Contributors

- Ronald Portier <[email protected]>

- `Tecnativa <https://www.tecnativa.com>`__:

- Carolina Fernandez

Maintainers
-----------

Expand Down
3 changes: 2 additions & 1 deletion account_statement_import_online/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Copyright 2019-2020 Brainbean Apps (https://brainbeanapps.com)
# Copyright 2020 CorporateHub (https://corporatehub.eu)
# Copyright 2023 Therp BV (https://therp.nl)
# Copyright 2024 Tecnativa - Carolina Fernandez
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Online Bank Statements",
"version": "16.0.1.2.2",
"version": "17.0.1.0.0",
"author": "CorporateHub, Odoo Community Association (OCA)",
"maintainers": ["alexey-pelykh"],
"website": "https://github.com/OCA/bank-statement-import",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def _create_or_update_statement(
def make_statement_name(self, statement_date_since):
"""Make name for statement using date and journal name."""
self.ensure_one()
return "%s/%s" % (
return "{}/{}".format(
self.journal_id.code,
statement_date_since.strftime("%Y-%m-%d"),
)
Expand Down
2 changes: 2 additions & 0 deletions account_statement_import_online/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
- Alexey Pelykh \<<[email protected]>\>
- [Therp BV](https://therp.nl/)
- Ronald Portier \<<[email protected]>\>
- [Tecnativa](https://www.tecnativa.com):
- Carolina Fernandez
4 changes: 4 additions & 0 deletions account_statement_import_online/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,10 @@ <h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
<li>Ronald Portier &lt;<a class="reference external" href="mailto:ronald&#64;therp.nl">ronald&#64;therp.nl</a>&gt;</li>
</ul>
</li>
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
<li>Carolina Fernandez</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,13 +406,11 @@ def _getExpectedStatements(self, expected_length):
)
else:
_logger.warning(
_("Names and dates for statements found: %(statements)s"),
dict(
statements=", ".join(
["%s - %s" % (stmt.name, stmt.date) for stmt in statements]
)
),
_("Names and dates for statements found: {}").format(
", ".join(f"{stmt.name} - {stmt.date}" for stmt in statements)
)
)

# Now do the normal assert.
self.assertEqual(len(statements), expected_length)
# If we got expected number, return them.
Expand Down
12 changes: 6 additions & 6 deletions account_statement_import_online/views/account_journal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,32 @@
name="online_bank_statements"
string="Online Bank Statements (OCA)"
groups="account.group_account_user"
attrs="{'invisible': [('bank_statements_source', '!=', 'online')]}"
invisible="bank_statements_source != 'online'"
>
<label
for="online_bank_statement_provider"
string="Provider"
attrs="{'required': [('bank_statements_source', '=', 'online')]}"
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')]}"
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)]}"
invisible="not online_bank_statement_provider_id"
class="oe_read_only"
/>
<field
name="online_bank_statement_provider_id"
nolabel="1"
attrs="{'invisible': [('online_bank_statement_provider_id', '=', False)]}"
invisible="not online_bank_statement_provider_id"
class="oe_read_only"
/>
</group>
Expand All @@ -53,7 +53,7 @@
<button
type="action"
name="%(action_online_bank_statements_pull_wizard)d"
attrs="{'invisible': [('bank_statements_source', '!=', 'online')]}"
invisible="bank_statements_source != 'online'"
string="Pull Online Bank Statement"
groups="account.group_account_user"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<button
type="action"
name="%(action_online_bank_statements_pull_wizard)d"
attrs="{'invisible': [('active', '=', False)]}"
invisible="not active"
string="Pull Online Bank Statement"
/>
</header>
Expand All @@ -60,7 +60,7 @@
name="web_ribbon"
title="Archived"
bg_color="bg-danger"
attrs="{'invisible': [('active', '=', True)]}"
invisible="active"
/>
<group name="main" col="2">
<group name="params">
Expand Down

0 comments on commit 96c22d0

Please sign in to comment.