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

[IMP] Use API 2, because old api is no longer supported #44

Merged
merged 1 commit into from
Apr 2, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions l10n_nl_postcodeapi/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ Configuration
Please enter the API key that you request from PostcodeAPI into the system
parameter 'l10n_nl_postcodeapi.apikey'

Module version 8.0.0.2.0 and higher use a version 2 API key from PostcodeAPI.
The old version 1 API key is not compatible with the new API key.

Provinces are autocompleted if a country state with the exact name is found in
the system. A CSV file with the Dutch provinces is included in the data
directory, but not loaded by default. You can import the file manually.
Expand Down
2 changes: 1 addition & 1 deletion l10n_nl_postcodeapi/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{
'name': 'Integration with PostcodeApi.nu',
'summary': 'Autocomplete Dutch addresses using PostcodeApi.nu',
'version': '8.0.0.1.0',
'version': '8.0.0.2.0',
'author': 'Therp BV,Odoo Community Association (OCA)',
'category': 'Localization',
'website': 'https://github.com/OCA/l10n-netherlands',
Expand Down
2 changes: 1 addition & 1 deletion l10n_nl_postcodeapi/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def get_provider_obj(self):
if not apikey or apikey == 'Your API key':
return False
from pyPostcode import Api
provider = Api(apikey)
provider = Api(apikey, (2, 0, 0))
test = provider.getaddress('1053NJ', '334T')
if not test or not test._data:
raise exceptions.Warning(
Expand Down