This release is a pre-release and may not be stable for production use.
Unique bank account numbers
It can be desirable to be able to rely on a bank account number identifying exactly one partner. This module allows you to enforce this, so that an account number is unique in the system.
There are some valid corner cases were it is valid to have multiple records for the same account number. For instance in a multicompany setup where the bank-account linked to one company, is a partner bank account for another company.
Because of these corner cases, the constraint is no longer implemented as a SQL unique index. This has the added advantage, that the module can be installed on databases where the bank-account numbers are not unique already.
To find records that are not unique, you could use the following SQL statement:
with res_partner_bank_sanitized as (
select
id, acc_number, coalesce(company_id, 0) as company_id,
sanitized_acc_number
from res_partner_bank
),
res_partner_bank_sanitized_grouped as (
select
array_agg(id) ids, sanitized_acc_number, count(*) kount,
company_id
from res_partner_bank_sanitized
group by sanitized_acc_number, company_id
)
select * from res_partner_bank_sanitized_grouped where kount > 1;
Installation
The constraint is active for new and changed numbers, from the moment of installation.
Bug Tracker
Bugs are tracked on GitHub Issues.
Credits
Contributors
Holger Brunn <hbrunn@therp.nl>
Ronald Portier <ronald@therp.nl>
Maintainer
This module is maintained by the OCA.
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.
To contribute to this module, please visit http://odoo-community.org.
Metadata
Release files for odoo8-addon-base-bank-account-number-unique 8.0.1.1.0.99.dev4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| odoo8_addon_base_bank_account_number_unique-8.0.1.1.0.99.dev4-py2-none-any.whl | Python 2 | none | any | Details for odoo8_addon_base_bank_account_number_unique-8.0.1.1.0.99.dev4-py2-none-any.whl |
Release files / odoo8_addon_base_bank_account_number_unique-8.0.1.1.0.99.dev4-py2-none-any.whl
| Download URL | odoo8_addon_base_bank_account_number_unique-8.0.1.1.0.99.dev4-py2-none-any.whl |
|---|---|
| Size | 19.2 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
44d68bd39d645f82cfe3e67f3044bd529ebc6c6c8d376e0a78ba0d2a495fd8ab
|
|
BLAKE2b-256 checksum How to use checksums |
6b9780dca7e22bac375db6519a4b4c9cc95e249d602de3038cc750eb25488cf9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/60.3.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.5
|
Security for odoo8-addon-base-bank-account-number-unique 8.0.1.1.0.99.dev4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.