Why doesn't party.address use country.zip?

Should party.address use country.zip (instead of the 4 fields zip, city, country and subdivision)?

I would like to have consistent addresses (on country.zip). Having a country.zip in the address will help a lot.

I know there are non-core modules (ie party_zip) that try to extend party.address by adding country.zip and keep the other fields consistent with on_change.

Are there other Models (other address Model) in core that use country.zip? (I look for it but didn’t find any).

I do not think so. country.zip is not unique records (one zip code may point to multiple city) and trytond_import_zip removes them before importing new one (so this will break all the references). It was designed as a assistant for completion.
Also we do not have zip’s for all countries. And even if we had, it will be a very huge amount of data to load.

Thanks for your answer, I think I understand your reasons but I still think it may had been a good idea to reference country.zip. The help for completion (wouldn’t had been required) and in the case when people had chosen not to populate country.zip they would had populated the country.zips on their own as they entered addresses.

The existence of country.zip and how it works with addresses makes sense now that I understand that it was created as an assistant.

The fact that trytond_import_zip will break those references makes me a bit worried. If I or anybody chooses to have a reference to country.zip we will have the same issue. May be trytond_import_zip should not delete the old ones, (may be replace and deactivate).

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.