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

[ADD] l10n_nl_normalize_zip #56

Merged
merged 2 commits into from
Jan 11, 2017
Merged

Conversation

hbrunn
Copy link
Member

@hbrunn hbrunn commented Nov 1, 2016

Normalize Dutch zip codes

This module was written to have zipcodes formatted in the standard Dutch way, which is 0000 XX.

Usage

To use this module, you need to:

#. fill in a zip number on a partner
#. be happy that whatever you fill in there, if it looks remotely like a Dutch zip code, it will be forced to the format above.

@hbrunn hbrunn added this to the 8.0 milestone Nov 1, 2016
@hbrunn
Copy link
Member Author

hbrunn commented Nov 1, 2016

@pedrobaeza can you add server-tools to runbot?

@astirpe
Copy link
Member

astirpe commented Nov 1, 2016

@hbrunn with this module you format the zip for every partner regardless if it's country is Netherlands or not. Is it correct? In this case is it possible to format the zip depending on the Country if it's already set?

@pedrobaeza
Copy link
Member

server-tools added in runbot and rebuild launched

@hbrunn
Copy link
Member Author

hbrunn commented Nov 1, 2016

@pedrobaeza thanks!
@astirpe I consider it correctish ;-) Note that the code is quite cautious about not touching strings that don't look like Dutch zip codes. A check for the first 4 being digits and the last two being characters wouldn't hurt I guess though, added this right now.

Judging from https://en.wikipedia.org/wiki/List_of_postal_codes, the Dutch format is unique, so it shouldn't clash with some other country and we avoid reading the partners for every write on the zip code.

@NL66278
Copy link
Contributor

NL66278 commented Nov 1, 2016

👍 LGTM

@andreschenkels
Copy link
Member

👍

@astirpe
Copy link
Member

astirpe commented Nov 1, 2016

@hbrunn when installing the module, the zip value of existing partners is not automatically updated; was it intentional to not provide a post_init_hook for normalizing the zip for all the existing partners?

Code review is 👍 for me

@hbrunn
Copy link
Member Author

hbrunn commented Nov 1, 2016

intentional as in not relevant for my current problem. It's certainly a good thing to have for people who want to install this in an existing database, should be very straightforward to add

@hbrunn
Copy link
Member Author

hbrunn commented Nov 8, 2016

can we merge this?

Copy link
Member

@pankk pankk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed code, looks great!

Copy link
Member

@tarteo tarteo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@hbrunn hbrunn merged commit 83d6d5f into OCA:8.0 Jan 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants