diff --git a/account_statement_import_online_gocardless/README.rst b/account_statement_import_online_gocardless/README.rst index 23b8a028..d5527429 100644 --- a/account_statement_import_online_gocardless/README.rst +++ b/account_statement_import_online_gocardless/README.rst @@ -7,7 +7,7 @@ Online Bank Statements: GoCardless !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:7a5de14c24a125d23a9fdba3ee6f041af430db49bb390e327f4a6ed2c4e11071 + !! source digest: sha256:7e08b9033d303931d6ce5d4c420d57a3615ef932c2680ce05c103f37e6141654 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -17,13 +17,13 @@ Online Bank Statements: GoCardless :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/15.0/account_statement_import_online_gocardless + :target: https://github.com/OCA/bank-statement-import/tree/16.0/account_statement_import_online_gocardless :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-15-0/bank-statement-import-15-0-account_statement_import_online_gocardless + :target: https://translation.odoo-community.org/projects/bank-statement-import-16-0/bank-statement-import-16-0-account_statement_import_online_gocardless :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/bank-statement-import&target_branch=15.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/bank-statement-import&target_branch=16.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -69,11 +69,11 @@ To configure online bank statements provider: #. Put your secret ID and secret key on the existing fields. #. Click on the button "Select Bank Account Identifier". - .. image:: https://raw.githubusercontent.com/OCA/bank-statement-import/15.0/account_statement_import_online_gocardless/static/img/gocardless_configuration.gif + .. image:: https://raw.githubusercontent.com/OCA/bank-statement-import/16.0/account_statement_import_online_gocardless/static/img/gocardless_configuration.gif #. A new window will appear for selecting the bank entity. - .. image:: https://raw.githubusercontent.com/OCA/bank-statement-import/15.0/account_statement_import_online_gocardless/static/img/gocardless_bank_selection.gif + .. image:: https://raw.githubusercontent.com/OCA/bank-statement-import/16.0/account_statement_import_online_gocardless/static/img/gocardless_bank_selection.gif #. Select it, and you will be redirected to the selected entity for introducing your bank credentials to allow the connection. @@ -103,7 +103,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 to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -140,6 +140,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_gocardless/__manifest__.py b/account_statement_import_online_gocardless/__manifest__.py index a916eeb6..53f3c5dc 100644 --- a/account_statement_import_online_gocardless/__manifest__.py +++ b/account_statement_import_online_gocardless/__manifest__.py @@ -3,7 +3,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Online Bank Statements: GoCardless", - "version": "15.0.1.0.0", + "version": "16.0.1.0.0", "category": "Account", "website": "https://github.com/OCA/bank-statement-import", "author": "ForgeFlow, Tecnativa, Odoo Community Association (OCA)", @@ -19,10 +19,8 @@ "lib/gocardless-ui/selector.css", "account_statement_import_online_gocardless/static/src/" "js/select_bank_widget.js", - ], - "web.assets_qweb": [ - "account_statement_import_online_gocardless/static/src/xml" - "/select_bank_widget.xml" + "account_statement_import_online_gocardless/static/src/" + "xml/select_bank_widget.xml", ], }, } diff --git a/account_statement_import_online_gocardless/models/online_bank_statement_provider.py b/account_statement_import_online_gocardless/models/online_bank_statement_provider.py index 6a9dc6f3..ae707071 100644 --- a/account_statement_import_online_gocardless/models/online_bank_statement_provider.py +++ b/account_statement_import_online_gocardless/models/online_bank_statement_provider.py @@ -14,6 +14,7 @@ from odoo.exceptions import UserError from odoo.tools import DEFAULT_SERVER_DATE_FORMAT as DF GOCARDLESS_ENDPOINT = "https://bankaccountdata.gocardless.com/api/v2" +REQUESTS_TIMEOUT = 5 class OnlineBankStatementProvider(models.Model): @@ -67,6 +68,7 @@ class OnlineBankStatementProvider(models.Model): {"secret_id": self.username, "secret_key": self.password} ), headers=self._gocardless_get_headers(basic=True), + timeout=REQUESTS_TIMEOUT, ) data = {} if response.status_code == 200: @@ -108,6 +110,7 @@ class OnlineBankStatementProvider(models.Model): f"{GOCARDLESS_ENDPOINT}/institutions/", params={"country": country.code}, headers=self._gocardless_get_headers(), + timeout=REQUESTS_TIMEOUT, ) if response.status_code == 400: raise UserError(_("Incorrect country code or country not supported.")) @@ -148,6 +151,7 @@ class OnlineBankStatementProvider(models.Model): } ), headers=self._gocardless_get_headers(), + timeout=REQUESTS_TIMEOUT, ) if response.status_code == 201: requisition_data = json.loads(response.text) @@ -167,6 +171,7 @@ class OnlineBankStatementProvider(models.Model): requisition_response = requests.get( f"{GOCARDLESS_ENDPOINT}/requisitions/{self.gocardless_requisition_id}/", headers=self._gocardless_get_headers(), + timeout=REQUESTS_TIMEOUT, ) requisition_data = json.loads(requisition_response.text) accounts = requisition_data.get("accounts", []) @@ -176,6 +181,7 @@ class OnlineBankStatementProvider(models.Model): account_response = requests.get( f"{GOCARDLESS_ENDPOINT}/accounts/{account_id}/", headers=self._gocardless_get_headers(), + timeout=REQUESTS_TIMEOUT, ) if account_response.status_code == 200: account_data = json.loads(account_response.text) @@ -192,6 +198,7 @@ class OnlineBankStatementProvider(models.Model): f"{GOCARDLESS_ENDPOINT}/agreements/enduser/" f"{requisition_data['agreement']}/", headers=self._gocardless_get_headers(), + timeout=REQUESTS_TIMEOUT, ) agreement_data = json.loads(agreement_response.text) self.gocardless_requisition_expiration = datetime.strptime( @@ -243,6 +250,7 @@ class OnlineBankStatementProvider(models.Model): "date_to": date_until.strftime(DF), }, headers=self._gocardless_get_headers(), + timeout=REQUESTS_TIMEOUT, ) if transaction_response.status_code == 200: return json.loads(transaction_response.text) diff --git a/account_statement_import_online_gocardless/readme/CONTRIBUTORS.rst b/account_statement_import_online_gocardless/readme/CONTRIBUTORS.rst index 4165b627..a7d7525e 100644 --- a/account_statement_import_online_gocardless/readme/CONTRIBUTORS.rst +++ b/account_statement_import_online_gocardless/readme/CONTRIBUTORS.rst @@ -5,3 +5,6 @@ * `Tecnativa `__: * Pedro M. Baeza +* `Alusage `__: + + * Nicolas JEUDY diff --git a/account_statement_import_online_gocardless/static/description/index.html b/account_statement_import_online_gocardless/static/description/index.html index 6bb08e81..1d00b4f1 100644 --- a/account_statement_import_online_gocardless/static/description/index.html +++ b/account_statement_import_online_gocardless/static/description/index.html @@ -516,7 +516,7 @@ div.compound .compound-last, div.compound .compound-middle { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:5523e4b06eaa38f0f74b6181f2043b93037f673d8a5038474c13dc323f1492ac +!! source digest: sha256:7e08b9033d303931d6ce5d4c420d57a3615ef932c2680ce05c103f37e6141654 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta