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

l10n_nl_bsn: searching on BSN without dots #231

Closed
thomaspaulb opened this issue May 15, 2019 · 5 comments
Closed

l10n_nl_bsn: searching on BSN without dots #231

thomaspaulb opened this issue May 15, 2019 · 5 comments
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.

Comments

@thomaspaulb
Copy link
Contributor

thomaspaulb commented May 15, 2019

I have seen that the l10n_nl_bsn module reformats the BSN by placing dots between the numbers in certain places, eg. 123.45.678 instead of 12345678. However, when reading for example CSV files with BSN data and trying to match on it, the data will often be without those dots and thus the matching/searching on BSN will not work without extra modifications. Searching on a number without dots will also not work well in the regular Odoo "advanced search".

To me, the dots are formatting and the BSN should not be stored with them; rather there should be something like a BSN widget that shows the formatted BSN but the stored number is still vanilla. This is IMO the "right" way and will also aid in searching and comparing.

Any opinions on this?

@thomaspaulb thomaspaulb changed the title l10n_nl_bsn: searching on BSN eg. from CSV l10n_nl_bsn: searching on BSN without dots eg. from CSV May 15, 2019
@thomaspaulb thomaspaulb changed the title l10n_nl_bsn: searching on BSN without dots eg. from CSV l10n_nl_bsn: searching on BSN without dots May 15, 2019
@astirpe
Copy link
Member

astirpe commented May 16, 2019

Yes, I agree.
Alternatively we could implement a search method for the bsn field. This will fix the Odoo "advanced search" and probably will also fix the importing by CSV.

@thomaspaulb
Copy link
Contributor Author

True, but such a search method should then be accompanied by either of these three:

  1. A migration script that adds dots to existing BSN's, very strict enforcing that dotless BSN's don't enter the database and searching on BSN's with dots only
  2. Some Postgres trick that allows a where search on a transform of the BSN value to something without dots (i dont know if this exists)
  3. A stored, indexed computed field without dots that the search operates on

@astirpe
Copy link
Member

astirpe commented May 16, 2019

@thomaspaulb the above three points are not necessary IMO. The search method must allow the search on both dotted and not-dotted records, so no need of migration scripts or extra computed fields.

@thomaspaulb
Copy link
Contributor Author

Ah yes, my mind missed the option of searching for dotted as well as non-dotted. That should also do it.

@github-actions
Copy link

github-actions bot commented Oct 3, 2021

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Oct 3, 2021
@github-actions github-actions bot closed this as completed Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

No branches or pull requests

2 participants