From 763f0df78c8b6a9de4c2692be0c957522f69ec67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Duy=20=28=C4=90=E1=BB=97=20Anh=29?= Date: Wed, 6 Nov 2024 09:35:15 +0700 Subject: [PATCH] [MIG] account_statement_import_base: Migration to 18.0 --- account_statement_import_base/README.rst | 18 +++++++------ account_statement_import_base/__manifest__.py | 2 +- .../models/account_bank_statement_line.py | 4 +-- .../models/account_journal.py | 10 +++----- .../readme/CONTRIBUTORS.md | 3 +++ .../readme/DESCRIPTION.md | 2 +- .../static/description/index.html | 25 ++++++++++++------- .../views/account_bank_statement_line.xml | 4 +-- 8 files changed, 40 insertions(+), 28 deletions(-) diff --git a/account_statement_import_base/README.rst b/account_statement_import_base/README.rst index de983433..b28f6043 100644 --- a/account_statement_import_base/README.rst +++ b/account_statement_import_base/README.rst @@ -17,13 +17,13 @@ Base module for Bank Statement Import :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License: LGPL-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/17.0/account_statement_import_base + :target: https://github.com/OCA/bank-statement-import/tree/18.0/account_statement_import_base :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-17-0/bank-statement-import-17-0-account_statement_import_base + :target: https://translation.odoo-community.org/projects/bank-statement-import-18-0/bank-statement-import-18-0-account_statement_import_base :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=17.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/bank-statement-import&target_branch=18.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -31,8 +31,8 @@ Base module for Bank Statement Import This is a technical module designed to share code between 2 other modules: -- **account_statement_import** that allows to import bank statements - from files, +- **account_statement_import_file** that allows to import bank + statements from files, - **account_statement_import_online** that allows to import bank statements from webservices/APIs. @@ -47,7 +47,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. @@ -64,6 +64,10 @@ Contributors - Alexis de Lattre +- Trobz + + - Do Anh Duy + Maintainers ----------- @@ -85,6 +89,6 @@ Current `maintainer `__: |maintainer-alexis-via| -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_base/__manifest__.py b/account_statement_import_base/__manifest__.py index 2ad24db7..02bb6364 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": "17.0.1.0.0", + "version": "18.0.1.0.0", "license": "LGPL-3", "depends": ["account_statement_base"], "author": "Akretion, Odoo Community Association (OCA)", diff --git a/account_statement_import_base/models/account_bank_statement_line.py b/account_statement_import_base/models/account_bank_statement_line.py index 0058331f..ef301e6d 100644 --- a/account_statement_import_base/models/account_bank_statement_line.py +++ b/account_statement_import_base/models/account_bank_statement_line.py @@ -10,8 +10,8 @@ class AccountBankStatementLine(models.Model): # Ensure transactions can be imported only once # if the import format provides unique transaction IDs - unique_import_id = fields.Char(string="Import ID", readonly=True, copy=False) - raw_data = fields.Text(readonly=True, copy=False) + unique_import_id = fields.Char(string="Import ID", copy=False) + raw_data = fields.Text(copy=False) _sql_constraints = [ ( diff --git a/account_statement_import_base/models/account_journal.py b/account_statement_import_base/models/account_journal.py index 3080fe74..1618511a 100644 --- a/account_statement_import_base/models/account_journal.py +++ b/account_statement_import_base/models/account_journal.py @@ -54,14 +54,12 @@ class AccountJournal(models.Model): self, st_line_vals, account_number ): self.ensure_one() - if st_line_vals.get("unique_import_id"): + unique_import_id = st_line_vals.get("unique_import_id") + if unique_import_id: sanitized_acc_number = self._sanitize_bank_account_number(account_number) st_line_vals["unique_import_id"] = ( - (sanitized_acc_number and sanitized_acc_number + "-" or "") - + str(self.id) - + "-" - + st_line_vals["unique_import_id"] - ) + f"{sanitized_acc_number}-" if sanitized_acc_number else "" + ) + f"{self.id}-{unique_import_id}" @api.model def _sanitize_bank_account_number(self, account_number): diff --git a/account_statement_import_base/readme/CONTRIBUTORS.md b/account_statement_import_base/readme/CONTRIBUTORS.md index b61afe5d..add4c09d 100644 --- a/account_statement_import_base/readme/CONTRIBUTORS.md +++ b/account_statement_import_base/readme/CONTRIBUTORS.md @@ -1 +1,4 @@ - Alexis de Lattre \<\> + +- Trobz \<\> + - Do Anh Duy \<\> diff --git a/account_statement_import_base/readme/DESCRIPTION.md b/account_statement_import_base/readme/DESCRIPTION.md index b147dead..18741167 100644 --- a/account_statement_import_base/readme/DESCRIPTION.md +++ b/account_statement_import_base/readme/DESCRIPTION.md @@ -1,7 +1,7 @@ This is a technical module designed to share code between 2 other modules: -- **account_statement_import** that allows to import bank statements +- **account_statement_import_file** that allows to import bank statements from files, - **account_statement_import_online** that allows to import bank statements from webservices/APIs. diff --git a/account_statement_import_base/static/description/index.html b/account_statement_import_base/static/description/index.html index 44b56c79..74f13899 100644 --- a/account_statement_import_base/static/description/index.html +++ b/account_statement_import_base/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 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code { 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.option { span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -368,12 +369,12 @@ ul.auto-toc { !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:8a0ca56de404b6170ac3b65b4307eebcf333aba95bdd7ae467333cafd5796bde !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

+

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:

    -
  • account_statement_import that allows to import bank statements -from files,
  • +
  • account_statement_import_file that allows to import bank +statements from files,
  • account_statement_import_online that allows to import bank statements from webservices/APIs.
@@ -394,7 +395,7 @@ statements from webservices/APIs.

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.

@@ -409,18 +410,24 @@ If you spotted it first, help us to smash it by providing a detailed and welcome

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.

Current maintainer:

alexis-via

-

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_base/views/account_bank_statement_line.xml b/account_statement_import_base/views/account_bank_statement_line.xml index aa9238e4..226b1baa 100644 --- a/account_statement_import_base/views/account_bank_statement_line.xml +++ b/account_statement_import_base/views/account_bank_statement_line.xml @@ -13,11 +13,11 @@ /> - + - +