Skip to content

Commit

Permalink
[MIG] account_statement_import_camt54: Migration to 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
xaviedoanhduy committed Nov 8, 2024
1 parent 24d8364 commit 4ce867c
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 14 deletions.
3 changes: 3 additions & 0 deletions account_statement_import_camt54/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ Contributors
- `Trobz <https://trobz.com>`__:

- Son Ho <[email protected]>
- Do Anh Duy <[email protected]>

Other credits
-------------
Expand All @@ -101,6 +102,8 @@ Other credits
supported by Camptocamp
- The migration of this module from 16.0 to 17.0 was financially
supported by Camptocamp
- The migration of this module from 17.0 to 18.0 was financially
supported by Camptocamp

Maintainers
-----------
Expand Down
2 changes: 1 addition & 1 deletion account_statement_import_camt54/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Bank Account Camt54 Import",
"version": "17.0.1.0.0",
"version": "18.0.1.0.0",
"category": "Account",
"website": "https://github.com/OCA/bank-statement-import",
"author": "camptocamp, " "Odoo Community Association (OCA)",
Expand Down

This file was deleted.

6 changes: 3 additions & 3 deletions account_statement_import_camt54/models/parser.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright 2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import _, models
from odoo import models
from odoo.exceptions import UserError


Expand All @@ -23,7 +23,7 @@ def _get_partner_ref(self, isr):
size = 6
else:
raise UserError(
_(
self.env._(
"Config parameter `qrr_partner_ref` is wrong.\n"
"It must be in format `i[,n]` \n"
"where `i` is the position of the first digit and\n"
Expand All @@ -38,7 +38,7 @@ def _get_partner_ref(self, isr):
end = start + size
except ValueError:
raise UserError(
_(
self.env._(
"Config parameter `qrr_partner_ref` is wrong.\n"
"It must be in format `i[,n]` \n"
"`i` and `n` must be integers.\n"
Expand Down
1 change: 1 addition & 0 deletions account_statement_import_camt54/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
- [Trobz](https://trobz.com):

> - Son Ho \<<[email protected]>\>
> - Do Anh Duy \<<[email protected]>\>
1 change: 1 addition & 0 deletions account_statement_import_camt54/readme/CREDITS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- Digital4efficiency.ch
- The migration of this module from 15.0 to 16.0 was financially supported by Camptocamp
- The migration of this module from 16.0 to 17.0 was financially supported by Camptocamp
- The migration of this module from 17.0 to 18.0 was financially supported by Camptocamp
3 changes: 3 additions & 0 deletions account_statement_import_camt54/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ <h1>Contributors</h1>
<blockquote>
<ul class="simple">
<li>Son Ho &lt;<a class="reference external" href="mailto:sonhd&#64;trobz.com">sonhd&#64;trobz.com</a>&gt;</li>
<li>Do Anh Duy &lt;<a class="reference external" href="mailto:duyda&#64;trobz.com">duyda&#64;trobz.com</a>&gt;</li>
</ul>
</blockquote>
</li>
Expand All @@ -444,6 +445,8 @@ <h1>Other credits</h1>
supported by Camptocamp</li>
<li>The migration of this module from 16.0 to 17.0 was financially
supported by Camptocamp</li>
<li>The migration of this module from 17.0 to 18.0 was financially
supported by Camptocamp</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand Down
11 changes: 9 additions & 2 deletions account_statement_import_camt54/tests/test_statement.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def setUpClass(cls):
)

def _load_statement(self):
testfile = file_path("account_statement_import_camt/test_files/test-camt054")
testfile = file_path("account_statement_import_camt/tests/samples/test-camt054")
with open(testfile, "rb") as datafile:
camt_file = base64.b64encode(datafile.read())
self.env["account.statement.import"].create(
Expand All @@ -50,7 +50,14 @@ def _load_statement(self):
}
).import_file_button()
bank_st_record = self.env["account.bank.statement"].search(
[("name", "=", "20220120000000000000000")], limit=1
[
(
"name",
"in",
["TBNKC Statement 2022-01-26", "20220120000000000000000"],
)
],
limit=1,
)
statement_lines = bank_st_record.line_ids
return statement_lines
Expand Down

0 comments on commit 4ce867c

Please sign in to comment.