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

**URL:** <https://discuss.tryton.org/t/why-doesnt-party-address-use-country-zip/621>\
**Category:** Developer\
**Created:** [July 25, 2018, 5:34am UTC](https://discuss.tryton.org/t/why-doesnt-party-address-use-country-zip/621 "2018-07-25T05:34:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fgui](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/fgui/32/184_2.png) [@fgui](https://discuss.tryton.org/u/fgui)\
**Post date:** [July 25, 2018, 5:34am UTC](https://discuss.tryton.org/t/why-doesnt-party-address-use-country-zip/621/1 "2018-07-25T05:34:45Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [July 25, 2018, 7:09am UTC](https://discuss.tryton.org/t/why-doesnt-party-address-use-country-zip/621/2 "2018-07-25T07:09:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![fgui](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/fgui/32/184_2.png) [@fgui](https://discuss.tryton.org/u/fgui)\
**Post date:** [July 25, 2018, 1:48pm UTC](https://discuss.tryton.org/t/why-doesnt-party-address-use-country-zip/621/3 "2018-07-25T13:48:27Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)\
**Post date:** [July 30, 2018, 5:43am UTC](https://discuss.tryton.org/t/why-doesnt-party-address-use-country-zip/621/4 "2018-07-30T05:43:05Z")

</div>

Closed on July 30, 2018, 5:43am UTC

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