OdooWiki OCA HUB

Base Location Geonames Import

base_location_geonames_import folder_open OCA/partner-contact open_in_new
Partner Management License: AGPL-3

This module adds a wizard to import cities and/or city zip entries from Geonames database.

auto_awesome What this module does

AI-generated from the code · Odoo 19.0

Adds a wizard that downloads the official Geonames city and postal-code list for a country and creates or updates the matching cities, states and zip entries in Odoo, removing entries that no longer exist in the file.

This module gives you a one-screen wizard to fill Odoo with official city, state and postal-code data from geonames.org instead of typing them by hand.

Where it appears: - A new menu entry "Import from Geonames" under the Contacts localisation menu. - On the country form, two technical fields (visible only to the Settings group) let you choose which columns of the Geonames file hold the state name and state code; Spain and Italy are pre-configured.

What the wizard does: - You pick one or more countries and an optional letter case (unchanged, Title Case or Upper Case) applied to imported city and state names. - It downloads the country's zip file from geonames.org, reads it, and creates missing states, cities (res.city) and zip entries (res.city.zip). - Existing records are matched by name/code so they are not duplicated. - After import, entries that are no longer present in the downloaded file are deleted for that country, so the data stays in sync with Geonames. - If a download fails, an error message is shown.

Access is restricted to the Settings group. The wizard is a temporary screen (city.zip.geonames.import) and does not store data itself.

Depends on

Menus it adds

city_zip_geonames_import_menu
Models and fields (2)
  • res.country · extends an existing modelgeonames_state_code_column, geonames_state_name_column
  • city.zip.geonames.import · new modelcountry_ids (Countries), letter_case

Text generated by AI (DeepSeek) from reading the Odoo 19.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 8 confirmed, 1 with no information of 9 versions.

Sources · Odoo 12.0

Confirmed on 2026-11-03 in branch 12.0 of OCA/partner-contact.

terminal Installation and usage

OCA documentation · Odoo 19.0

To access the menu to import city zip entries from Geonames you must be part of the group Administration / Settings.

If you want/need to modify the default Geonames URL (), you can set the geonames.url system parameter.

Go to the menu Contacts \> Configuration \> Localization \> Import from Geonames. In the wizard, select one or several countries and click on the Import button.

For each selected country, the wizard will delete all not detected entries, download the latest version of the list of cities from geonames.org and create new city zip entries.

No verified information in OCA: Installation.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.