Integration with PostcodeApi.nu

l10n_nl_postcodeapi
REPOSITORY
REPOSITORYOCA/l10n-netherlands
GIT
GIThttps://github.com/OCA/l10n-netherlands.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-netherlands/tree/12.0/l10n_nl_postcodeapi
VERSION
VERSION 2.0.0
CATEGORY
CATEGORYLocalization
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Therp BV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Therp BV
COMMITTERS
COMMITTERSRonald Portier (Therp BV), Weblate, OCA-git-bot, Jan Verbeek, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-netherlands
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:29:19
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/l10n-netherlands:
    - l10n_nl_country_states
odoo/odoo:
    - base_address_extended
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES pyPostcode
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (0)

No views found for this module.

Models touched (2)

New fields (0)

No new fields.

Public methods (3)
  • create(self, vals_list)
    @api.model
    Clear the postcode provider cache when the API key is created.
  • get_provider_obj(self)
    @api.model@ormcache(skiparg=2)
    get Api to interface with Dutch postcode provider.
  • write(self, vals)
    @api.multi
    Clear the postcode provider cache when the API key is modified.

New fields (0)

No new fields.

Public methods (2)
  • get_country_state(self, country, state_name)
    Lookup state within a country.
  • on_change_zip_street_number(self)
    @api.onchange('zip', 'street_number', 'country_id')
    Autocomplete dutch addresses if postalcode and streetnumber are filled. NB. postal_code is named 'zip' in Odoo, but is this a reserved keyword in Python.
REPOSITORY
REPOSITORYOCA/l10n-netherlands
GIT
GIThttps://github.com/OCA/l10n-netherlands.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-netherlands/tree/11.0/l10n_nl_postcodeapi
VERSION
VERSION 2.0.0
CATEGORY
CATEGORYLocalization
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Therp BV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Therp BV
COMMITTERS
COMMITTERSRonald Portier, Holger Brunn, Andrea, oca-travis, OCA-git-bot, OCA Git Bot
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-netherlands
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:23:58
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/l10n-netherlands:
    - l10n_nl_country_states
odoo/odoo:
    - base_address_extended
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES pyPostcode
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (0)

No views found for this module.

Models touched (2)

New fields (0)

No new fields.

Public methods (3)
  • create(self, vals)
    @api.model
    Clear the postcode provider cache when the API key is created.
  • get_provider_obj(self)
    @api.model@ormcache(skiparg=2)
    get Api to interface with Dutch postcode provider.
  • write(self, vals)
    @api.multi
    Clear the postcode provider cache when the API key is modified.

New fields (0)

No new fields.

Public methods (2)
  • get_country_state(self, country, state_name)
    @api.model
    Lookup state within a country.
  • on_change_zip_street_number(self)
    @api.onchange('zip', 'street_number', 'country_id')
    Autocomplete dutch addresses if postalcode and streetnumber are filled. NB. postal_code is named 'zip' in Odoo, but is this a reserved keyword in Python.
REPOSITORY
REPOSITORYOCA/l10n-netherlands
GIT
GIThttps://github.com/OCA/l10n-netherlands.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-netherlands/tree/10.0/l10n_nl_postcodeapi
VERSION
VERSION 0.1.0
CATEGORY
CATEGORYLocalization
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Therp BV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Therp BV
COMMITTERS
COMMITTERSHolger Brunn, Pedro M. Baeza, OCA Transbot, oca-travis
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-netherlands
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:19:57
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/partner-contact:
    - partner_street_number
odoo/odoo:
    - base
    - web
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES pyPostcode
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (0)

No views found for this module.

Models touched (3)

New fields (0)

No new fields.

Public methods (2)
  • create(self, vals)
    @api.model@api.returns('self', <expr>)
    Clear the postcode provider cache when the API key is created
  • write(self, vals)
    @api.multi
    Clear the postcode provider cache when the API key is modified

New fields (0)

No new fields.

Public methods (3)
  • create(self, vals)
    @api.model@api.returns('self', <expr>)
    Clear the postcode provider cache when the state table is altered.
  • unlink(self)
    @api.multi
    Clear the postcode provider cache when the state table is altered.
  • write(self, vals)
    @api.multi
    Clear the postcode provider cache when the state table is altered.

New fields (0)

No new fields.

Public methods (3)
  • get_provider_obj(self)
    @api.model@ormcache(skiparg=2)
  • get_province(self, province)
    @api.model@ormcache(skiparg=2)
    Return the province or empty recordset
  • on_change_zip_street_number(self)
    @api.onchange('zip', 'street_number', 'country_id')
    Normalize the zip code, check on the partner's country and if all is well, request address autocompletion data. NB. postal_code is named 'zip' in OpenERP, but is this a reserved keyword in Python
REPOSITORY
REPOSITORYOCA/l10n-netherlands
GIT
GIThttps://github.com/OCA/l10n-netherlands.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-netherlands/tree/9.0/l10n_nl_postcodeapi
VERSION
VERSION 0.1.0
CATEGORY
CATEGORYLocalization
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Therp BV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Therp BV
COMMITTERS
COMMITTERSHolger Brunn, Pedro M. Baeza, oca-travis
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-netherlands
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:15:21
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/partner-contact:
    - partner_street_number
odoo/odoo:
    - web
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES pyPostcode
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (0)

No views found for this module.

Models touched (3)

New fields (0)

No new fields.

Public methods (2)
  • create(self, vals)
    @api.model@api.returns('self', <expr>)
    Clear the postcode provider cache when the API key is created
  • write(self, vals)
    @api.multi
    Clear the postcode provider cache when the API key is modified

New fields (0)

No new fields.

Public methods (3)
  • create(self, vals)
    @api.model@api.returns('self', <expr>)
    Clear the postcode provider cache when the state table is altered.
  • unlink(self)
    @api.multi
    Clear the postcode provider cache when the state table is altered.
  • write(self, vals)
    @api.multi
    Clear the postcode provider cache when the state table is altered.

New fields (0)

No new fields.

Public methods (4)
  • fields_view_get(self, view_id=None, view_type='form', toolbar=False, submenu=False)
    @api.model
    Address fields can be all over the place due to module interaction. For improved compatibility add the onchange method here, not in a view.
  • get_provider_obj(self)
    @api.model@ormcache(skiparg=2)
  • get_province(self, province)
    @api.model@ormcache(skiparg=2)
    Return the province or empty recordset
  • on_change_zip_street_number(self)
    @api.onchange('zip', 'street_number', 'country_id')
    Normalize the zip code, check on the partner's country and if all is well, request address autocompletion data. NB. postal_code is named 'zip' in OpenERP, but is this a reserved keyword in Python
REPOSITORY
REPOSITORYOCA/l10n-netherlands
GIT
GIThttps://github.com/OCA/l10n-netherlands.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-netherlands/tree/8.0/l10n_nl_postcodeapi
VERSION
VERSION 0.2.0
CATEGORY
CATEGORYLocalization
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Therp BV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Therp BV
COMMITTERS
COMMITTERSStéphane Bidoul, Stefan Rijnhart, Holger Brunn, Stéphane Bidoul (ACSONE), OCA Transbot, StefanRijnhart, Roel Adriaans, oca-travis, astirpe
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-netherlands
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:11:23
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/partner-contact:
    - partner_street_number
odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES pyPostcode
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (0)

No views found for this module.

Models touched (3)

New fields (0)

No new fields.

Public methods (2)
  • create(self, vals)
    @api.model@api.returns('self', <expr>)
    Clear the postcode provider cache when the API key is created
  • write(self, vals)
    @api.multi
    Clear the postcode provider cache when the API key is modified

New fields (0)

No new fields.

Public methods (3)
  • create(self, vals)
    @api.model@api.returns('self', <expr>)
    Clear the postcode provider cache when the state table is altered.
  • unlink(self)
    @api.multi
    Clear the postcode provider cache when the state table is altered.
  • write(self, vals)
    @api.multi
    Clear the postcode provider cache when the state table is altered.

New fields (0)

No new fields.

Public methods (4)
  • fields_view_get(self, view_id=None, view_type='form', toolbar=False, submenu=False)
    @api.model
    Address fields can be all over the place due to module interaction. For improved compatibility add the onchange method here, not in a view.
  • get_provider_obj(self)
    @api.model@ormcache(skiparg=2)
  • get_province(self, province)
    @api.model@ormcache(skiparg=2)
    Return the province or empty recordset
  • on_change_zip_street_number(self)
    @api.onchange('zip', 'street_number', 'country_id')
    Normalize the zip code, check on the partner's country and if all is well, request address autocompletion data. NB. postal_code is named 'zip' in OpenERP, but is this a reserved keyword in Python
REPOSITORY
REPOSITORYOCA/l10n-netherlands
GIT
GIThttps://github.com/OCA/l10n-netherlands.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/l10n-netherlands/tree/7.0/l10n_nl_postcodeapi
VERSION
VERSION 0.1
CATEGORY
CATEGORYLocalization
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSTherp BV
MAINTAINERS
MAINTAINERSTherp BV
COMMITTERS
COMMITTERSHolger Brunn
WEBSITE
WEBSITEhttps://github.com/OCA/l10n-netherlands
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:07:14
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/partner-contact:
    - partner_street_number
odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES pyPostcode
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Auto-completion for Dutch addresses
===================================
This module contains integration of the excellent and free address completion
service 'PostcodeAPI'. The service allows lookups by zip code and house number,
providing street name and city. The lookups will be triggered in the partner
form views when a zip code or house number is entered or modified. Only
Dutch addresses (which is assumed to include addresses with no country) are
auto-completed.

More info about the lookup service here: http://www.postcodeapi.nu/

Dependencies
============
This module depends on the module partner_street_number, which will split
up the street field into separate fields for street name and number.

You also need to have the 'pyPostcode' Python library by Stefan Jansen
installed (https://github.com/steffex/pyPostcode). Install in the following way
for now, until this lib is available on Pypi::

    pip install git+https://github.com/stefanrijnhart/pyPostcode.git@pypi

Configuration
=============
Please enter the API key that you request from PostcodeAPI into the system
parameter 'l10n_nl_postcodeapi.apikey'

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.

Compatibility
=============
This module is compatible with OpenERP 7.0.

Code Analysis

Views touched (0)

No views found for this module.

Models touched (3)

New fields (0)

No new fields.

Public methods (2)
  • create(self, cr, uid, vals, context=None)
    Clear the postcode provider cache when the API key is created
  • write(self, cr, uid, ids, vals, context=None)
    Clear the postcode provider cache when the API key is modified

New fields (0)

No new fields.

Public methods (2)
  • create(self, cr, uid, vals, context=None)
    Clear the postcode provider cache when the state table is altered.
  • write(self, cr, uid, ids, vals, context=None)
    Clear the postcode provider cache when the state table is altered.

New fields (0)

No new fields.

Public methods (5)
  • fields_view_get(self, cr, user, view_id=None, view_type='form', context=None, toolbar=False, submenu=False)
    Address fields can be all over the place due to module interaction. For improved compatibility add the onchange method here, not in a view.
  • get_country_nl(self, cr, uid)
    @ormcache(skiparg=3)
  • get_provider_obj(self, cr)
    @ormcache(skiparg=2)
  • get_province(self, cr, uid, province)
    @ormcache(skiparg=3)
  • on_change_zip_street_number(self, cr, uid, ids, postal_code, street_number, country_id, context=None)
    Normalize the zip code, check on the partner's country and if all is well, request address autocompletion data. NB. postal_code is named 'zip' in OpenERP, but is this a reserved keyword in Python