OCA / partner-contact

Odoo Partner and Contact related addons
GNU Affero General Public License v3.0
207 stars 851 forks source link

[FIX] base_location_geonames_import: avoid code duplicates in country states #1840

Open Tisho99 opened 2 months ago

Tisho99 commented 2 months ago

Currently, some countries like Bulgaria, Latvia and Sweden can't be imported with this module due to a duplicity in the code of their states on the data files.

With this fix, the states with the same code of another already parsed are discarded, and countries can be imported in spite of having an error of one of their state codes

T-5767

Tisho99 commented 1 month ago

@HaraldPanten @ValentinVinagre @luis-ron

Tisho99 commented 1 month ago

Thanks for the reviews @pedrobaeza

I have tried to edit the files directly in geonames, but with no success.

Then i have patched the files on the fly and imported them with other method.

I have also updated the #1841 PR, but it still needs the adition of a unit test and more work.

Do you think it is worth merging any of these PRs?

pedrobaeza commented 1 month ago

Well, if they are correctly done according the comments, why not?