diff --git a/account_statement_import_camt54/README.rst b/account_statement_import_camt54/README.rst index 91b1c21a..2c8e7be1 100644 --- a/account_statement_import_camt54/README.rst +++ b/account_statement_import_camt54/README.rst @@ -14,13 +14,13 @@ Bank Account Camt54 Import :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fbank--statement--import-lightgray.png?logo=github - :target: https://github.com/OCA/bank-statement-import/tree/14.0/account_statement_import_camt54 + :target: https://github.com/OCA/bank-statement-import/tree/15.0/account_statement_import_camt54 :alt: OCA/bank-statement-import .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/bank-statement-import-14-0/bank-statement-import-14-0-account_statement_import_camt54 + :target: https://translation.odoo-community.org/projects/bank-statement-import-15-0/bank-statement-import-15-0-account_statement_import_camt54 :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/174/14.0 + :target: https://runbot.odoo-community.org/runbot/174/15.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -59,7 +59,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -95,6 +95,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/bank-statement-import `_ project on GitHub. +This module is part of the `OCA/bank-statement-import `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_statement_import_camt54/__manifest__.py b/account_statement_import_camt54/__manifest__.py index a5d82d49..4d83d628 100644 --- a/account_statement_import_camt54/__manifest__.py +++ b/account_statement_import_camt54/__manifest__.py @@ -2,7 +2,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Bank Account Camt54 Import", - "version": "14.0.1.1.0", + "version": "15.0.1.0.0", "category": "Account", "website": "https://github.com/OCA/bank-statement-import", "author": "camptocamp, " "Odoo Community Association (OCA)", diff --git a/account_statement_import_camt54/i18n/account_statement_import_camt54.pot b/account_statement_import_camt54/i18n/account_statement_import_camt54.pot index 0a45b96e..0cb545ad 100644 --- a/account_statement_import_camt54/i18n/account_statement_import_camt54.pot +++ b/account_statement_import_camt54/i18n/account_statement_import_camt54.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 14.0\n" +"Project-Id-Version: Odoo Server 15.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" diff --git a/account_statement_import_camt54/i18n/it.po b/account_statement_import_camt54/i18n/it.po index 0b48266b..e7a48957 100644 --- a/account_statement_import_camt54/i18n/it.po +++ b/account_statement_import_camt54/i18n/it.po @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 14.0\n" +"Project-Id-Version: Odoo Server 15.0\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: 2021-11-25 17:36+0000\n" "Last-Translator: Sergio Zanchetta \n" diff --git a/account_statement_import_camt54/models/account_statement_import.py b/account_statement_import_camt54/models/account_statement_import.py index 40b6dbf5..594c656c 100644 --- a/account_statement_import_camt54/models/account_statement_import.py +++ b/account_statement_import_camt54/models/account_statement_import.py @@ -34,6 +34,7 @@ class AccountStatementImport(models.TransientModel): statement.balance_end_real = statement.balance_start else: statement.balance_end_real = statement.balance_start + amount + return def _complete_stmts_vals(self, stmts_vals, journal, account_number): """Search partner from partner reference""" diff --git a/account_statement_import_camt54/models/parser.py b/account_statement_import_camt54/models/parser.py index b12b1caa..ef74f438 100644 --- a/account_statement_import_camt54/models/parser.py +++ b/account_statement_import_camt54/models/parser.py @@ -35,7 +35,7 @@ class CamtParser(models.AbstractModel): start = int(start) - 1 # count from 1 instead of 0 size = int(size) end = start + size - except ValueError: + except ValueError as err: raise exceptions.UserError( _( "Config parameter `isr_partner_ref` is wrong.\n" @@ -43,7 +43,7 @@ class CamtParser(models.AbstractModel): "`i` and `n` must be integers.\n" 'e.g. "13,6"' ) - ) + ) from err return isr[start:end].lstrip("0") def parse_transaction_details(self, ns, node, transaction): diff --git a/account_statement_import_camt54/static/description/index.html b/account_statement_import_camt54/static/description/index.html index 05789f76..aebd4a1a 100644 --- a/account_statement_import_camt54/static/description/index.html +++ b/account_statement_import_camt54/static/description/index.html @@ -367,7 +367,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/bank-statement-import Translate me on Weblate Try me on Runbot

+

Beta License: AGPL-3 OCA/bank-statement-import Translate me on Weblate Try me on Runbot

This module allows you to import CAMT.054 file (details of customers payments batch) into a dedicated journal taking care of the start/end balance and the remittance reference number.

Customer invoices will be reconciled/Paid. Payment entries will be posted into an internal transfer account (that you have to create with a type current asset and set on the journal)

@@ -402,7 +402,7 @@ For instance 13,6 to start on position 13 with a 6 digit long refer

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -433,7 +433,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

-

This module is part of the OCA/bank-statement-import project on GitHub.

+

This module is part of the OCA/bank-statement-import project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/account_statement_import_camt54/tests/test_get_partner_ref.py b/account_statement_import_camt54/tests/test_get_partner_ref.py index f42b039e..4e8f4b13 100644 --- a/account_statement_import_camt54/tests/test_get_partner_ref.py +++ b/account_statement_import_camt54/tests/test_get_partner_ref.py @@ -5,10 +5,11 @@ from odoo.tests import common class TestGetPartnerRef(common.TransactionCase): - def setUp(self): - super().setUp() - self.Parser = self.env["account.statement.import.camt.parser"] - self.ICP = self.env["ir.config_parameter"] + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.Parser = cls.env["account.statement.import.camt.parser"] + cls.ICP = cls.env["ir.config_parameter"] def test_no_ICP(self): """Test no partner ref is read if param is not set""" diff --git a/account_statement_import_camt54/tests/test_statement.py b/account_statement_import_camt54/tests/test_statement.py index aa59318f..b1db17d9 100644 --- a/account_statement_import_camt54/tests/test_statement.py +++ b/account_statement_import_camt54/tests/test_statement.py @@ -4,13 +4,15 @@ import base64 from odoo.modules.module import get_module_resource -from odoo.tests.common import SavepointCase +from odoo.tests.common import TransactionCase -class TestGenerateBankStatement(SavepointCase): +class TestGenerateBankStatement(TransactionCase): @classmethod def setUpClass(cls): super().setUpClass() + eur = cls.env.ref("base.EUR") + eur.write({"active": True}) bank = cls.env["res.partner.bank"].create( { "acc_number": "NL77ABNA0574908765", @@ -33,7 +35,7 @@ class TestGenerateBankStatement(SavepointCase): "code": "TBNKCAMT", "type": "bank", "bank_account_id": bank.id, - "currency_id": cls.env.ref("base.EUR").id, + "currency_id": eur.id, } )