You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
2.0 KiB

  1. .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
  2. :alt: License: AGPL-3
  3. Unique bank account numbers
  4. ===========================
  5. 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.
  6. Installation
  7. ============
  8. During installation, the module checks if your bank account numbers are unique already. If this is not the case, you won't be able to install the module until duplicates are fixed.
  9. The error message only shows the first few duplicates, in order to find all of them, use the following statement::
  10. with res_partner_bank_sanitized as (select id, acc_number, regexp_replace(acc_number, '\W+', '', 'g') acc_number_sanitized from res_partner_bank),
  11. res_partner_bank_sanitized_grouped as (select array_agg(id) ids, acc_number_sanitized, count(*) amount from res_partner_bank_sanitized group by acc_number_sanitized)
  12. select * from res_partner_bank_sanitized_grouped where amount > 1;
  13. Bug Tracker
  14. ===========
  15. Bugs are tracked on `GitHub Issues <https://github.com/OCA/bank-statement-import/issues>`_.
  16. In case of trouble, please check there if your issue has already been reported.
  17. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
  18. `here <https://github.com/OCA/bank-statement-import/issues/new?body=module:%20base_bank_account_number_unique%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
  19. Credits
  20. =======
  21. Contributors
  22. ------------
  23. * Holger Brunn <hbrunn@therp.nl>
  24. Maintainer
  25. ----------
  26. .. image:: https://odoo-community.org/logo.png
  27. :alt: Odoo Community Association
  28. :target: https://odoo-community.org
  29. This module is maintained by the OCA.
  30. OCA, or the Odoo Community Association, is a nonprofit organization whose
  31. mission is to support the collaborative development of Odoo features and
  32. promote its widespread use.
  33. To contribute to this module, please visit http://odoo-community.org.