Metadata-Version: 2.1
Name: odoo-addon-account_statement_import_generate_unique_id
Version: 18.0.1.0.0.1
Requires-Python: >=3.10
Requires-Dist: odoo-addon-account_statement_import_base==18.0.*
Requires-Dist: odoo==18.0.*
Summary: Generate a unique import ID for statement lines without one
Home-page: https://github.com/OCA/bank-statement-import
License: LGPL-3
Author: MT Software, Odoo Community Association (OCA)
Author-email: support@odoo-community.org
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 18.0
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
Classifier: Development Status :: 4 - Beta
Description-Content-Type: text/x-rst

.. image:: https://odoo-community.org/readme-banner-image
   :target: https://odoo-community.org/get-involved?utm_source=readme
   :alt: Odoo Community Association

========================================
Bank Statement Import Generate Unique ID
========================================

.. 
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! This file is generated by oca-gen-addon-readme !!
   !! changes will be overwritten.                   !!
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! source digest: sha256:6aa1b74f9dbaa006f461a386b66dc2116178370080c9064fb3eba8d942a0f505
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
    :target: https://odoo-community.org/page/development-status
    :alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png
    :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/18.0/account_statement_import_generate_unique_id
    :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-18-0/bank-statement-import-18-0-account_statement_import_generate_unique_id
    :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=18.0
    :alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Some bank statement sources (e.g. some CSV/sheet exports or camt files)
do not provide a unique identifier for their transactions. Without it,
importing an overlapping period creates duplicate statement lines.

This module adds an option on bank journals to generate a
``unique_import_id`` for statement lines that come without one. The
value is a SHA-256 hash of the normalized account number, date, payment
reference, amount, reference and partner name. An identifier provided by
the source always takes priority.

Identical transactions within the same import are numbered (``<hash>``,
``<hash>-2``, ``<hash>-3``, ...), so they are all imported, while
importing the same statement again still ignores all of them.

**Table of contents**

.. contents::
   :local:

Configuration
=============

Go to *Invoicing > Configuration > Journals*, open a bank journal and
enable *Generate Missing Import IDs*.

Only statement lines imported after enabling the option get a generated
import ID. To set it for the existing statement lines of the journal
that have none, click *Generate for Existing Lines* next to the option.
Lines whose generated import ID is already used by another line are
skipped and reported, as they may be duplicates. Check them manually.

Usage
=====

**Only enable this option for journals whose source provides no
transaction identifier.**

Identical transactions (same account number, date, payment reference,
amount, reference and partner name) can only be told apart within the
same import. If an import ends between two identical transactions of the
same day, the second one gets the same identifier in the next import and
is ignored as already imported. Therefore always import complete days,
and do not enable this option when such identical transactions are
common and statements may cover partial days.

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_generate_unique_id%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.

Credits
=======

Authors
-------

* MT Software

Contributors
------------

- Michael Tietz (MT Software) <mtietz@mt-software.de>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
   :alt: Odoo Community Association
   :target: https://odoo-community.org

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.

.. |maintainer-mt-software-de| image:: https://github.com/mt-software-de.png?size=40px
    :target: https://github.com/mt-software-de
    :alt: mt-software-de

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-mt-software-de| 

This module is part of the `OCA/bank-statement-import <https://github.com/OCA/bank-statement-import/tree/18.0/account_statement_import_generate_unique_id>`_ project on GitHub.

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