-
-
Notifications
You must be signed in to change notification settings - Fork 387
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] account_reconcile_no_numerical_token
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.
- Loading branch information
1 parent
e8d1521
commit 690184a
Showing
15 changed files
with
766 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
14
account_reconcile_model_no_numerical_token/__manifest__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
3
account_reconcile_model_no_numerical_token/models/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
22 changes: 22 additions & 0 deletions
22
account_reconcile_model_no_numerical_token/models/account_reconcile_model.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
3 changes: 3 additions & 0 deletions
3
account_reconcile_model_no_numerical_token/readme/CONTRIBUTORS.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
10
account_reconcile_model_no_numerical_token/readme/DESCRIPTION.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Binary file added
BIN
+9.23 KB
account_reconcile_model_no_numerical_token/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.