From d4dfcd574060b6c3fa2332aad036570f47f2dfd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Taymans?= Date: Fri, 18 Oct 2024 14:01:45 +0200 Subject: [PATCH 1/4] [FIX] account_statement_import_base: sanitized acc number The field acc_number in the database is not sanitized by default. This leads to account_bank_statement_line with an empty partner_id because the check done in _statement_line_import_update_hook() uses the sanitized_acc_number instead of the acc_number. For a right comparison the sanitized version of the acc_number should be put in the speeddict. --- account_statement_import_base/models/account_journal.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/account_statement_import_base/models/account_journal.py b/account_statement_import_base/models/account_journal.py index 3080fe74b..788054336 100644 --- a/account_statement_import_base/models/account_journal.py +++ b/account_statement_import_base/models/account_journal.py @@ -24,7 +24,10 @@ def _statement_line_import_speeddict(self): ["acc_number", "partner_id"], ) for partner_bank in partner_banks: - speeddict["account_number"][partner_bank["acc_number"]] = { + sanitized_acc_number = self._sanitize_bank_account_number( + partner_bank["acc_number"] + ) + speeddict["account_number"][sanitized_acc_number] = { "partner_id": partner_bank["partner_id"][0], "partner_bank_id": partner_bank["id"], } From 849a7ca1eed7be009a5548c6722c4f23f6a10c50 Mon Sep 17 00:00:00 2001 From: Florian da Costa Date: Mon, 21 Oct 2024 15:09:50 +0200 Subject: [PATCH 2/4] [FIX] account_statement_import_online_paypal : search transaction with a 1 second margin to ensure it is found --- .../models/online_bank_statement_provider_paypal.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/account_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py b/account_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py index 2f515b042..bfcda564b 100644 --- a/account_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py +++ b/account_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py @@ -364,14 +364,15 @@ def _paypal_get_balance(self, token, currency, as_of_timestamp): def _paypal_get_transaction(self, token, transaction_id, timestamp): self.ensure_one() - transaction_date = timestamp.isoformat() + "Z" + transaction_date_ini = (timestamp - relativedelta(seconds=1)).isoformat() + "Z" + transaction_date_end = (timestamp + relativedelta(seconds=1)).isoformat() + "Z" url = ( (self.api_base or PAYPAL_API_BASE) + "/v1/reporting/transactions" + ("?start_date=%s" "&end_date=%s" "&fields=all") % ( - transaction_date, - transaction_date, + transaction_date_ini, + transaction_date_end, ) ) data = self._paypal_retrieve(url, token) From 0049b44ff1d1b0dfddb94114b435c841f04ab751 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Tue, 24 Dec 2024 09:29:17 +0000 Subject: [PATCH 3/4] [BOT] post-merge updates --- README.md | 2 +- account_statement_import_online_paypal/README.rst | 2 +- .../__manifest__.py | 2 +- .../static/description/index.html | 13 ++++++++----- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c3d3a2696..63a5f250c 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ addon | version | maintainers | summary [account_statement_import_online](account_statement_import_online/) | 16.0.1.3.0 | [![alexey-pelykh](https://github.com/alexey-pelykh.png?size=30px)](https://github.com/alexey-pelykh) | Online bank statements update [account_statement_import_online_gocardless](account_statement_import_online_gocardless/) | 16.0.1.2.4 | | Online Bank Statements: GoCardless [account_statement_import_online_ofx](account_statement_import_online_ofx/) | 16.0.1.0.0 | | Online bank statements for OFX -[account_statement_import_online_paypal](account_statement_import_online_paypal/) | 16.0.1.0.1 | [![alexey-pelykh](https://github.com/alexey-pelykh.png?size=30px)](https://github.com/alexey-pelykh) | Online bank statements for PayPal.com +[account_statement_import_online_paypal](account_statement_import_online_paypal/) | 16.0.1.0.2 | [![alexey-pelykh](https://github.com/alexey-pelykh.png?size=30px)](https://github.com/alexey-pelykh) | Online bank statements for PayPal.com [account_statement_import_online_ponto](account_statement_import_online_ponto/) | 16.0.1.1.1 | | Online Bank Statements: MyPonto.com [account_statement_import_online_qonto](account_statement_import_online_qonto/) | 16.0.1.0.1 | | Online Bank Statements: Qonto [account_statement_import_qif](account_statement_import_qif/) | 16.0.1.0.0 | | Import QIF Bank Statements diff --git a/account_statement_import_online_paypal/README.rst b/account_statement_import_online_paypal/README.rst index 3504fd5d1..f1b732ccb 100644 --- a/account_statement_import_online_paypal/README.rst +++ b/account_statement_import_online_paypal/README.rst @@ -7,7 +7,7 @@ Online Bank Statements: PayPal.com !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:521adb8885c2e05ded338567e46308d7cae6e63faa15f8e989124b5390b7d7a4 + !! source digest: sha256:ddc2b0d3643831abd09d02f6348221d2782da3d0b285231a1d937b0eb79ee082 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/account_statement_import_online_paypal/__manifest__.py b/account_statement_import_online_paypal/__manifest__.py index fcae4b37f..6347d8d62 100644 --- a/account_statement_import_online_paypal/__manifest__.py +++ b/account_statement_import_online_paypal/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Online Bank Statements: PayPal.com", - "version": "16.0.1.0.1", + "version": "16.0.1.0.2", "author": "CorporateHub, Odoo Community Association (OCA)", "maintainers": ["alexey-pelykh"], "website": "https://github.com/OCA/bank-statement-import", diff --git a/account_statement_import_online_paypal/static/description/index.html b/account_statement_import_online_paypal/static/description/index.html index 41a8ddd40..d50d3e8a7 100644 --- a/account_statement_import_online_paypal/static/description/index.html +++ b/account_statement_import_online_paypal/static/description/index.html @@ -8,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -274,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -300,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -366,7 +367,7 @@

Online Bank Statements: PayPal.com

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:521adb8885c2e05ded338567e46308d7cae6e63faa15f8e989124b5390b7d7a4 +!! source digest: sha256:ddc2b0d3643831abd09d02f6348221d2782da3d0b285231a1d937b0eb79ee082 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

This module provides online bank statements from @@ -483,7 +484,9 @@

Contributors

Maintainers

This module is maintained by the OCA.

-Odoo Community Association + +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.

From 5e151fc7046824bce199542ac05b490a0d4441cb Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Tue, 24 Dec 2024 09:35:38 +0000 Subject: [PATCH 4/4] [BOT] post-merge updates --- README.md | 2 +- account_statement_import_base/README.rst | 2 +- account_statement_import_base/__manifest__.py | 2 +- .../static/description/index.html | 14 ++++++++------ 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 63a5f250c..e2bfa38f4 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Available addons ---------------- addon | version | maintainers | summary --- | --- | --- | --- -[account_statement_import_base](account_statement_import_base/) | 16.0.1.0.0 | [![alexis-via](https://github.com/alexis-via.png?size=30px)](https://github.com/alexis-via) | Base module for Bank Statement Import +[account_statement_import_base](account_statement_import_base/) | 16.0.1.0.1 | [![alexis-via](https://github.com/alexis-via.png?size=30px)](https://github.com/alexis-via) | Base module for Bank Statement Import [account_statement_import_camt](account_statement_import_camt/) | 16.0.1.0.2 | | CAMT Format Bank Statements Import [account_statement_import_camt54](account_statement_import_camt54/) | 16.0.1.0.0 | | Bank Account Camt54 Import [account_statement_import_file](account_statement_import_file/) | 16.0.1.1.0 | [![alexis-via](https://github.com/alexis-via.png?size=30px)](https://github.com/alexis-via) [![etobella](https://github.com/etobella.png?size=30px)](https://github.com/etobella) | Import Statement Files diff --git a/account_statement_import_base/README.rst b/account_statement_import_base/README.rst index dced4049e..1e1c44c83 100644 --- a/account_statement_import_base/README.rst +++ b/account_statement_import_base/README.rst @@ -7,7 +7,7 @@ Base module for Bank Statement Import !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:9fa09d431b4c7e1698f01c7fd2250709e7c51a8ad373c7b6bdefe84c3ead0541 + !! source digest: sha256:c7cc0078d436d9ef292a3f62de69631a3899fa891089fe235b6c086a6063f0ca !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png diff --git a/account_statement_import_base/__manifest__.py b/account_statement_import_base/__manifest__.py index d5d78b395..10653f1b7 100644 --- a/account_statement_import_base/__manifest__.py +++ b/account_statement_import_base/__manifest__.py @@ -5,7 +5,7 @@ { "name": "Base module for Bank Statement Import", "category": "Accounting", - "version": "16.0.1.0.0", + "version": "16.0.1.0.1", "license": "LGPL-3", "depends": ["account_statement_base"], "author": "Akretion, Odoo Community Association (OCA)", diff --git a/account_statement_import_base/static/description/index.html b/account_statement_import_base/static/description/index.html index 0d7a670f5..4fdbb1968 100644 --- a/account_statement_import_base/static/description/index.html +++ b/account_statement_import_base/static/description/index.html @@ -1,4 +1,3 @@ - @@ -9,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -275,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -301,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -367,7 +367,7 @@

Base module for Bank Statement Import

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:9fa09d431b4c7e1698f01c7fd2250709e7c51a8ad373c7b6bdefe84c3ead0541 +!! source digest: sha256:c7cc0078d436d9ef292a3f62de69631a3899fa891089fe235b6c086a6063f0ca !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Mature License: LGPL-3 OCA/bank-statement-import Translate me on Weblate Try me on Runboat

This is a technical module designed to share code between 2 other modules:

@@ -412,7 +412,9 @@

Contributors

Maintainers

This module is maintained by the OCA.

-Odoo Community Association + +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.