¶ Process for Odoo 12 and 13
This is also described at the “module info” webpage of “Base Location Geonames Import” and the module’s README
- Verify Odoo timeout settings
- Go to Contacts > Configuration > Localization > Import from Geonames, and click on it to open a wizard.
- When you start the wizard, it will ask you to select a country.
- Then, for the selected country, it will delete all not detected entries, download the latest version of the list of cities from geonames.org and create new city zip entries.
The place to launch the import is different. It’s described also at the “module info” webpage and README
- Verify Odoo timeout settings
- Go to Settings > Technical > Cities/Locations Management > Import from Geonames, and click on it to open a wizard.
- Follow step 2 and 3 for Odoo 12 and 13
If the import process takes too long, Odoo may kill itself the worker thread and leave the task undone. To avoid this, you can increase the thread timeout, perform the action, and set it default or restore it when finished.
- Add this to your odoo.config:
; Increase timeout of thread worker from 2 to 10 minutes
limit_time_cpu = 6000
limit_time_real = 6000
- Restart Odoo
- Perform import as specified above
- Reset the timeout to the default value to avoid side effects.
- Restart Odoo
Sometimes Geonames has issues with its releases, and the release stays void for a whole day or so. If this happens and we can’t wait until they fix it, we can change instead the download URL and use a backup copy from the Internet Archive.
- Go to Configuració/Settings > Paràmetres del Sistema/System Parameters
- Add or modify an entry with: