Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][ADD] account_reconcile_no_numerical_token #753

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions account_reconcile_model_no_numerical_token/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
==========================================
Account Reconcile Model No Numerical Token
==========================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:fc89fd82413d4800348392c27b1ede21655c0afa5789275d21213f28a333f62d
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--reconcile-lightgray.png?logo=github
:target: https://github.com/OCA/account-reconcile/tree/16.0/account_reconcile_model_no_numerical_token
:alt: OCA/account-reconcile
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-reconcile-16-0/account-reconcile-16-0-account_reconcile_model_no_numerical_token
: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/account-reconcile&target_branch=16.0
:alt: Try me on Runboat

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

By default, when Odoo encounters a bank statement line ref such as a34bc3xxx1, it
will extract the numerical characters and concatenate them into a numerical token,
eg. 3431 in this case. If then a move line is found that has for example cxxx343y1
as a ref, it will match with this one also: not on the text ref but via the
numerical component.

Sometimes this is not desirable.

This module allows to configure a checkbox on a reconcile model to disable
numerical token matching for this model.

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module, you need to:

#. Open any reconcile model
#. Check the box: No Numerical Token Matching
#. Reconcile like usual, and less matches will be found (but hopefully better ones)

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-reconcile/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/account-reconcile/issues/new?body=module:%20account_reconcile_model_no_numerical_token%0Aversion:%2016.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
~~~~~~~

* Therp BV

Contributors
~~~~~~~~~~~~

* `Therp BV <https://therp.nl>`_:

* Tom Blauwendraat

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.

This module is part of the `OCA/account-reconcile <https://github.com/OCA/account-reconcile/tree/16.0/account_reconcile_model_no_numerical_token>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions account_reconcile_model_no_numerical_token/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
14 changes: 14 additions & 0 deletions account_reconcile_model_no_numerical_token/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2024 Therp BV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Account Reconcile Model No Numerical Token",
"summary": "Disable the use of numerical token in Odoo native reconcilation",
"version": "16.0.1.0.0",
"category": "Finance",
"website": "https://github.com/OCA/account-reconcile",
"author": "Therp BV, Odoo Community Association (OCA)",
"license": "AGPL-3",
"depends": ["account"],
"data": ["views/account_reconcile_model.xml"],
}
3 changes: 3 additions & 0 deletions account_reconcile_model_no_numerical_token/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import account_reconcile_model
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2024 Therp BV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


class AccountReconcileModel(models.Model):
_inherit = "account.reconcile.model"

no_numerical_tokens = fields.Boolean(
"No numerical token matching", help="Don't match on numerical tokens"
)

def _get_invoice_matching_st_line_tokens(self, st_line):
(
numerical_tokens,
exact_tokens,
_text_tokens,
) = super()._get_invoice_matching_st_line_tokens(st_line)
if self.no_numerical_tokens:
return [], exact_tokens, _text_tokens
return numerical_tokens, exact_tokens, _text_tokens
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* `Therp BV <https://therp.nl>`_:

* Tom Blauwendraat
10 changes: 10 additions & 0 deletions account_reconcile_model_no_numerical_token/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
By default, when Odoo encounters a bank statement line ref such as a34bc3xxx1, it
will extract the numerical characters and concatenate them into a numerical token,
eg. 3431 in this case. If then a move line is found that has for example cxxx343y1
as a ref, it will match with this one also: not on the text ref but via the
numerical component.

Sometimes this is not desirable.

This module allows to configure a checkbox on a reconcile model to disable
numerical token matching for this model.
5 changes: 5 additions & 0 deletions account_reconcile_model_no_numerical_token/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
To use this module, you need to:

#. Open any reconcile model
#. Check the box: No Numerical Token Matching
#. Reconcile like usual, and less matches will be found (but hopefully better ones)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading