diff --git a/account_statement_import_online_qonto/README.rst b/account_statement_import_online_qonto/README.rst index 3c6f16fc..4d49d135 100644 --- a/account_statement_import_online_qonto/README.rst +++ b/account_statement_import_online_qonto/README.rst @@ -2,6 +2,11 @@ Online Bank Statements: Qonto ============================= +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status :alt: Beta @@ -9,16 +14,16 @@ Online Bank Statements: Qonto :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/12.0/account_bank_statement_import_online_qonto + :target: https://github.com/OCA/bank-statement-import/tree/13.0/account_bank_statement_import_online_qonto :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-12-0/bank-statement-import-12-0-account_bank_statement_import_online_qonto + :target: https://translation.odoo-community.org/projects/bank-statement-import-13-0/bank-statement-import-13-0-account_bank_statement_import_online_qonto :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/12.0 + :target: https://runbot.odoo-community.org/runbot/174/13.0 :alt: Try me on Runbot -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| This module provides online bank statements from Qonto Bank. @@ -35,7 +40,7 @@ To configure online bank statements provider: #. Go to *Invoicing > Configuration > Bank Accounts* #. Open bank account to configure and edit it #. Set *Bank Feeds* to *Online* -#. Select *Qonto.eu* as online bank statements provider in +#. Select *Qonto* as online bank statements provider in *Online Bank Statements (OCA)* section #. Save the bank account #. Click on provider and configure provider-specific settings. @@ -46,14 +51,14 @@ or, alternatively: #. Open settings of the corresponding journal account #. Switch to *Bank Account* tab #. Set *Bank Feeds* to *Online* -#. Select *Qonto.eu* as online bank statements provider in +#. Select *Qonto* as online bank statements provider in *Online Bank Statements (OCA)* section #. Save the bank account #. Click on provider and configure provider-specific settings. To obtain *Login* and *Key*: -#. Open `Qonto.eu `_. +#. Open `Qonto `__. #. Go to *Settings* #. Go to *Api Integration*, click *Generate Key* @@ -73,7 +78,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. @@ -85,6 +90,14 @@ Authors * Florent de Labarre +Contributors +~~~~~~~~~~~~ + +* Florent de Labarre +* `Tecnativa `__: + + * Pedro M. Baeza + Maintainers ~~~~~~~~~~~ @@ -98,6 +111,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_online_qonto/__manifest__.py b/account_statement_import_online_qonto/__manifest__.py index 3f532eea..0dacf02e 100644 --- a/account_statement_import_online_qonto/__manifest__.py +++ b/account_statement_import_online_qonto/__manifest__.py @@ -1,7 +1,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { - "name": "Online Bank Statements: Qonto.eu", - "version": "12.0.1.0.0", + "name": "Online Bank Statements: Qonto", + "version": "13.0.1.0.0", "category": "Account", "website": "https://github.com/OCA/bank-statement-import", "author": "Florent de Labarre, Odoo Community Association (OCA)", diff --git a/account_statement_import_online_qonto/models/online_bank_statement_provider_qonto.py b/account_statement_import_online_qonto/models/online_bank_statement_provider_qonto.py index bad99979..9cad1f42 100644 --- a/account_statement_import_online_qonto/models/online_bank_statement_provider_qonto.py +++ b/account_statement_import_online_qonto/models/online_bank_statement_provider_qonto.py @@ -11,7 +11,7 @@ from odoo.exceptions import UserError from odoo.addons.base.models.res_bank import sanitize_account_number -QONTO_ENDPOINT = "https://thirdparty.qonto.eu/v2" +QONTO_ENDPOINT = "https://thirdparty.qonto.com/v2" class OnlineBankStatementProviderQonto(models.Model): @@ -20,7 +20,7 @@ class OnlineBankStatementProviderQonto(models.Model): @api.model def _get_available_services(self): return super()._get_available_services() + [ - ("qonto", "Qonto.eu"), + ("qonto", "Qonto"), ] def _obtain_statement_data(self, date_since, date_until): @@ -95,18 +95,18 @@ class OnlineBankStatementProviderQonto(models.Model): ): date = datetime.strptime(transaction["settled_at"], "%Y-%m-%dT%H:%M:%S.%fZ") side = 1 if transaction["side"] == "credit" else -1 - name = transaction["label"] or "/" - if transaction["reference"]: - name = "{} {}".format(name, transaction["reference"]) + payment_ref_list = [ + transaction["label"], + transaction["reference"], + ] vals_line = { "sequence": sequence, "date": date, - "name": name, + "name": " - ".join([x for x in payment_ref_list if x]) or "/", "ref": transaction["reference"], "unique_import_id": transaction["transaction_id"], "amount": transaction["amount"] * side, } - if not transaction["local_currency"]: raise UserError( _( @@ -117,12 +117,10 @@ class OnlineBankStatementProviderQonto(models.Model): ) if transaction["local_currency"] not in currencies_code2id: raise UserError( - _("Currency %s used in transaction ID %s doesn't exist " "in Odoo.") + _("Currency %s used in transaction ID %s doesn't exist in Odoo.") % (transaction["local_currency"], transaction["transaction_id"]) ) - line_currency_id = currencies_code2id[transaction["local_currency"]] - if journal_currency.id != line_currency_id: vals_line.update( { @@ -135,7 +133,6 @@ class OnlineBankStatementProviderQonto(models.Model): def _qonto_obtain_statement_data(self, date_since, date_until): self.ensure_one() journal = self.journal_id - slugs = self._qonto_get_slug() slug = slugs.get(self.account_number) if not slug: @@ -143,11 +140,8 @@ class OnlineBankStatementProviderQonto(models.Model): _("Qonto : wrong configuration, unknow account %s") % journal.bank_account_id.acc_number ) - transactions = self._qonto_obtain_transactions(slug, date_since, date_until) - journal_currency = journal.currency_id or journal.company_id.currency_id - all_currencies = self.env["res.currency"].search_read([], ["name"]) currencies_code2id = {x["name"]: x["id"] for x in all_currencies} new_transactions = [] @@ -158,7 +152,6 @@ class OnlineBankStatementProviderQonto(models.Model): transaction, sequence, journal_currency, currencies_code2id ) new_transactions.append(vals_line) - if new_transactions: return new_transactions, {} return diff --git a/account_statement_import_online_qonto/readme/CONFIGURE.rst b/account_statement_import_online_qonto/readme/CONFIGURE.rst new file mode 100644 index 00000000..781fb2f2 --- /dev/null +++ b/account_statement_import_online_qonto/readme/CONFIGURE.rst @@ -0,0 +1,26 @@ +To configure online bank statements provider: + +#. Go to *Invoicing > Configuration > Bank Accounts* +#. Open bank account to configure and edit it +#. Set *Bank Feeds* to *Online* +#. Select *Qonto* as online bank statements provider in + *Online Bank Statements (OCA)* section +#. Save the bank account +#. Click on provider and configure provider-specific settings. + +or, alternatively: + +#. Go to *Invoicing > Overview* +#. Open settings of the corresponding journal account +#. Switch to *Bank Account* tab +#. Set *Bank Feeds* to *Online* +#. Select *Qonto* as online bank statements provider in + *Online Bank Statements (OCA)* section +#. Save the bank account +#. Click on provider and configure provider-specific settings. + +To obtain *Login* and *Key*: + +#. Open `Qonto `__. +#. Go to *Settings* +#. Go to *Api Integration*, click *Generate Key* diff --git a/account_statement_import_online_qonto/readme/CONTRIBUTORS.rst b/account_statement_import_online_qonto/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..077a3ecf --- /dev/null +++ b/account_statement_import_online_qonto/readme/CONTRIBUTORS.rst @@ -0,0 +1,4 @@ +* Florent de Labarre +* `Tecnativa `__: + + * Pedro M. Baeza diff --git a/account_statement_import_online_qonto/readme/DESCRIPTION.rst b/account_statement_import_online_qonto/readme/DESCRIPTION.rst new file mode 100644 index 00000000..c47a5301 --- /dev/null +++ b/account_statement_import_online_qonto/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +This module provides online bank statements from Qonto Bank. diff --git a/account_statement_import_online_qonto/readme/USAGE.rst b/account_statement_import_online_qonto/readme/USAGE.rst new file mode 100644 index 00000000..03845f13 --- /dev/null +++ b/account_statement_import_online_qonto/readme/USAGE.rst @@ -0,0 +1,6 @@ +To pull historical bank statements: + +#. Go to *Invoicing > Configuration > Bank Accounts* +#. Select specific bank accounts +#. Launch *Actions > Online Bank Statements Pull Wizard* +#. Configure date interval and click *Pull* diff --git a/account_statement_import_online_qonto/static/description/icon.png b/account_statement_import_online_qonto/static/description/icon.png index 3a0328b5..f316d838 100644 Binary files a/account_statement_import_online_qonto/static/description/icon.png and b/account_statement_import_online_qonto/static/description/icon.png differ diff --git a/account_statement_import_online_qonto/static/description/index.html b/account_statement_import_online_qonto/static/description/index.html new file mode 100644 index 00000000..7312fd0c --- /dev/null +++ b/account_statement_import_online_qonto/static/description/index.html @@ -0,0 +1,465 @@ + + + + + + +Online Bank Statements: Qonto + + + +
+

Online Bank Statements: Qonto

+ + +

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

+

This module provides online bank statements from Qonto Bank.

+

Table of contents

+ +
+

Configuration

+

To configure online bank statements provider:

+
    +
  1. Go to Invoicing > Configuration > Bank Accounts
  2. +
  3. Open bank account to configure and edit it
  4. +
  5. Set Bank Feeds to Online
  6. +
  7. Select Qonto as online bank statements provider in +Online Bank Statements (OCA) section
  8. +
  9. Save the bank account
  10. +
  11. Click on provider and configure provider-specific settings.
  12. +
+

or, alternatively:

+
    +
  1. Go to Invoicing > Overview
  2. +
  3. Open settings of the corresponding journal account
  4. +
  5. Switch to Bank Account tab
  6. +
  7. Set Bank Feeds to Online
  8. +
  9. Select Qonto as online bank statements provider in +Online Bank Statements (OCA) section
  10. +
  11. Save the bank account
  12. +
  13. Click on provider and configure provider-specific settings.
  14. +
+

To obtain Login and Key:

+
    +
  1. Open Qonto.
  2. +
  3. Go to Settings
  4. +
  5. Go to Api Integration, click Generate Key
  6. +
+
+
+

Usage

+

To pull historical bank statements:

+
    +
  1. Go to Invoicing > Configuration > Bank Accounts
  2. +
  3. Select specific bank accounts
  4. +
  5. Launch Actions > Online Bank Statements Pull Wizard
  6. +
  7. Configure date interval and click Pull
  8. +
+
+
+

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.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Florent de Labarre
  • +
+
+
+

Contributors

+
    +
  • Florent de Labarre
  • +
  • Tecnativa:
      +
    • Pedro M. Baeza
    • +
    +
  • +
+
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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.

+

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

+
+
+
+ +