mirror of
https://github.com/OCA/bank-statement-import.git
synced 2025-01-20 12:37:43 +02:00
[MIG] account_statement_import_base: Migration to 18.0
This commit is contained in:
@@ -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 <https://github.com/OCA/bank-statement-import/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 <https://github.com/OCA/bank-statement-import/issues/new?body=module:%20account_statement_import_base%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
`feedback <https://github.com/OCA/bank-statement-import/issues/new?body=module:%20account_statement_import_base%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
|
||||
Do not contact contributors directly about support or help with technical issues.
|
||||
|
||||
@@ -64,6 +64,10 @@ Contributors
|
||||
|
||||
- Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
|
||||
- Trobz <https://www.trobz.com/>
|
||||
|
||||
- Do Anh Duy <duyda@trobz.com>
|
||||
|
||||
Maintainers
|
||||
-----------
|
||||
|
||||
@@ -85,6 +89,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|
||||
|
||||
|maintainer-alexis-via|
|
||||
|
||||
This module is part of the `OCA/bank-statement-import <https://github.com/OCA/bank-statement-import/tree/17.0/account_statement_import_base>`_ project on GitHub.
|
||||
This module is part of the `OCA/bank-statement-import <https://github.com/OCA/bank-statement-import/tree/18.0/account_statement_import_base>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
||||
@@ -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)",
|
||||
|
||||
@@ -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 = [
|
||||
(
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -1 +1,4 @@
|
||||
- Alexis de Lattre \<<alexis.delattre@akretion.com>\>
|
||||
|
||||
- Trobz \<<https://www.trobz.com/>\>
|
||||
- Do Anh Duy \<<duyda@trobz.com>\>
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Mature" src="https://img.shields.io/badge/maturity-Mature-brightgreen.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/bank-statement-import/tree/17.0/account_statement_import_base"><img alt="OCA/bank-statement-import" src="https://img.shields.io/badge/github-OCA%2Fbank--statement--import-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/bank-statement-import-17-0/bank-statement-import-17-0-account_statement_import_base"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/bank-statement-import&target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Mature" src="https://img.shields.io/badge/maturity-Mature-brightgreen.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/bank-statement-import/tree/18.0/account_statement_import_base"><img alt="OCA/bank-statement-import" src="https://img.shields.io/badge/github-OCA%2Fbank--statement--import-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/bank-statement-import-18-0/bank-statement-import-18-0-account_statement_import_base"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/bank-statement-import&target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This is a technical module designed to share code between 2 other
|
||||
modules:</p>
|
||||
<ul class="simple">
|
||||
<li><strong>account_statement_import</strong> that allows to import bank statements
|
||||
from files,</li>
|
||||
<li><strong>account_statement_import_file</strong> that allows to import bank
|
||||
statements from files,</li>
|
||||
<li><strong>account_statement_import_online</strong> that allows to import bank
|
||||
statements from webservices/APIs.</li>
|
||||
</ul>
|
||||
@@ -394,7 +395,7 @@ statements from webservices/APIs.</li>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/bank-statement-import/issues">GitHub Issues</a>.
|
||||
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
|
||||
<a class="reference external" href="https://github.com/OCA/bank-statement-import/issues/new?body=module:%20account_statement_import_base%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<a class="reference external" href="https://github.com/OCA/bank-statement-import/issues/new?body=module:%20account_statement_import_base%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
@@ -409,18 +410,24 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
||||
<h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Alexis de Lattre <<a class="reference external" href="mailto:alexis.delattre@akretion.com">alexis.delattre@akretion.com</a>></li>
|
||||
<li>Trobz <<a class="reference external" href="https://www.trobz.com/">https://www.trobz.com/</a>><ul>
|
||||
<li>Do Anh Duy <<a class="reference external" href="mailto:duyda@trobz.com">duyda@trobz.com</a>></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
|
||||
<p>This module is maintained by the OCA.</p>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org">
|
||||
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
|
||||
</a>
|
||||
<p>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.</p>
|
||||
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
|
||||
<p><a class="reference external image-reference" href="https://github.com/alexis-via"><img alt="alexis-via" src="https://github.com/alexis-via.png?size=40px" /></a></p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/bank-statement-import/tree/17.0/account_statement_import_base">OCA/bank-statement-import</a> project on GitHub.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/bank-statement-import/tree/18.0/account_statement_import_base">OCA/bank-statement-import</a> project on GitHub.</p>
|
||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
/>
|
||||
<field name="arch" type="xml">
|
||||
<group name="tech-fields" position="inside">
|
||||
<field name="unique_import_id" />
|
||||
<field name="unique_import_id" readonly="1" />
|
||||
</group>
|
||||
<group name="tech-fields" position="after">
|
||||
<group name="raw_data" string="Raw Data">
|
||||
<field name="raw_data" nolabel="1" colspan="2" />
|
||||
<field name="raw_data" nolabel="1" colspan="2" readonly="1" />
|
||||
</group>
|
||||
</group>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user